ionide / Fornax

Scriptable static site generator using type safe F# DSL to define page templates.
MIT License
241 stars 44 forks source link

dotnet tool install fornax -g -> forex new -> fornex watch Fails #43

Closed jbeeko closed 4 years ago

jbeeko commented 4 years ago

The instructions to create a sample website fail during the invocation of fornax watch. I tried fornax build as well, with the same result.

jbeeko-MBP:~ joergbeekmann$ dotnet tool install fornax -g
You can invoke the tool using the following command: fornax
Tool 'fornax' (version '0.10.0') was successfully installed.

jbeeko-MBP:Documents joergbeekmann$ fornax new
New project successfully created.

jbeeko-MBP:Documents joergbeekmann$ fornax watch
[14:27:35] '/Users/joergbeekmann/Documents/_public/index.html' generated in 436ms
[14:27:35] '/Users/joergbeekmann/Documents/_public/about.html' generated in 164ms
[14:27:35] '/Users/joergbeekmann/Documents/_public/contact.html' generated in 101ms
[14:27:37] '/Users/joergbeekmann/Documents/_public/.DS_Store' generated in 54ms
[14:27:37] '/Users/joergbeekmann/Documents/_public/.localized' generated in 50ms
[14:27:37] '/Users/joergbeekmann/Documents/_public/~$ndom-Thoughts.docx' generated in 34ms
[14:27:37] '/Users/joergbeekmann/Documents/_public/FsAutoComplete/FsAutoComplete.sln' generated in 35ms
[14:27:37] '/Users/joergbeekmann/Documents/_public/FsAutoComplete/LICENSE.md' generated in 35ms
[14:27:37] '/Users/joergbeekmann/Documents/_public/FsAutoComplete/build.cmd' generated in 33ms
[14:27:37] '/Users/joergbeekmann/Documents/_public/FsAutoComplete/Directory.Build.props' generated in 35ms
[14:27:38] '/Users/joergbeekmann/Documents/_public/FsAutoComplete/paket.lock' generated in 34ms
[14:27:38] '/Users/joergbeekmann/Documents/_public/FsAutoComplete/azure-pipelines.yml' generated in 38ms
[14:27:38] '/Users/joergbeekmann/Documents/_public/FsAutoComplete/README.md' generated in 33ms
[14:27:38] '/Users/joergbeekmann/Documents/_public/FsAutoComplete/appveyor.yml' generated in 34ms
[14:27:38] '/Users/joergbeekmann/Documents/_public/FsAutoComplete/build.sh' generated in 33ms
[14:27:38] '/Users/joergbeekmann/Documents/_public/FsAutoComplete/RELEASE_NOTES.md' generated in 35ms
[14:27:38] '/Users/joergbeekmann/Documents/_public/FsAutoComplete/global.json' generated in 37ms
[14:27:38] '/Users/joergbeekmann/Documents/_public/FsAutoComplete/paket.dependencies' generated in 78ms
[14:27:38] '/Users/joergbeekmann/Documents/_public/Personal/.DS_Store' generated in 42ms
[14:27:38] '/Users/joergbeekmann/Documents/_public/posts/post2.html' generated in 214ms
[14:27:38] '/Users/joergbeekmann/Documents/_public/posts/post.html' generated in 206ms
An unexpected error happend: Exception has been thrown by the target of an invocation.
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Generator.EvaluatorHelpers.helper@51(Object next, FSharpList`1 args) in D:\Programowanie\Projekty\Fornax\src\Fornax\Generator.fs:line 61
   at Generator.EvaluatorHelpers.invokeFunction(Object f, IEnumerable`1 args) in D:\Programowanie\Projekty\Fornax\src\Fornax\Generator.fs:line 65
   at Generator.GeneratorEvaluator.evaluate@171-2.Invoke(FsiValue ft) in D:\Programowanie\Projekty\Fornax\src\Fornax\Generator.fs:line 174
   at Microsoft.FSharp.Core.ResultModule.Bind[T,TResult,TError](FSharpFunc`2 binder, FSharpResult`2 result) in E:\A\_work\130\s\src\fsharp\FSharp.Core\result.fs:line 15
   at Generator.GeneratorEvaluator.evaluate(FsiEvaluationSession fsi, SiteContents siteContent, String generatorPath, String projectRoot, String page) in D:\Programowanie\Projekty\Fornax\src\Fornax\Generator.fs:line 171
   at Generator.generate(FsiEvaluationSession fsi, Config cfg, SiteContents siteContent, String projectRoot, String page) in D:\Programowanie\Projekty\Fornax\src\Fornax\Generator.fs:line 276
   at Generator.action@1(String projectRoot, FsiEvaluationSession fsi, Config config, SiteContents sc, String filePath) in D:\Programowanie\Projekty\Fornax\src\Fornax\Generator.fs:line 390
   at Generator.generateFolder(String projectRoot) in D:\Programowanie\Projekty\Fornax\src\Fornax\Generator.fs:line 389
   at Fornax.guardedGenerate@144(String cwd, Unit unitVar0) in D:\Programowanie\Projekty\Fornax\src\Fornax\Fornax.fs:line 146
jbeeko commented 4 years ago

Turns out I ran this in the /Users/<username>/Documents directory. After cleanup that directory and creating a new directory the commands:

forax new
forax watch

are successful.