You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Installing fornax as a local tool on a CI server and trying to build a site throws an error "Couldn't find or load config".
To Reproduce
Create a fornax site (e.g. using fornax new)
Add a dotnet-tools.json with instructions to install fornax locally
Add a config file for your chosen CI platform which runs dotnet tool restore and dotnet fornax build
Push your site to a git repo and build using the CI service of your choice (e.g. TravisCI, Netlify, Azure Pipelines, etc.)
Watch the build fail and observe the printed error Couldn't find or load config.
Expected behaviour
The site should build.
Build Output
Below is the output from TravisCI. The same problem occurs on Azure Pipelines as well as Netlify.
dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.1.201
Commit: b1768b4ae7
Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /usr/share/dotnet/sdk/3.1.201/
Host (useful for support):
Version: 3.1.3
Commit: 4a9f85e9f8
.NET Core SDKs installed:
3.1.201 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
$ dotnet tool restore
$ pwd
/home/travis/build/LukeBurgessYeo/fsharp-tutorial
The command "pwd" exited with 0.
$ ls
config.fsx images _lib loaders README.md style
generators js LICENSE posts Script.fsx
The command "ls" exited with 0.
$ dotnet fornax build
Couldn't find or load config
The command "dotnet fornax build" exited with 1.
Notice that the working directory contains a config.fsx.
Additional Thoughts
Fornax works as expected locally with the globally installed dotnet tool, as well as with the locally installed dotnet tool. It seems that on these CI servers, the directory which dotnet fornax build is being run from is not the same as the directory which is being passed into the build process (i.e. this path from Directory.GetCurrentDirectory()).
The text was updated successfully, but these errors were encountered:
I ran into this same problem trying to build with GitHub actions, and after doing some research, I can see with strace on the fornax command that the problem is that it doesn't find the _lib\fornax.dll. It seems a little strange to check in a binary, though. How is this supposed to work?
I confirmed this all works fine on CI servers if you commit the _lib directory and it's contents. Is there a better way to be able to restore those during CI rather than include these binaries in source control?
Describe the bug
Installing fornax as a local tool on a CI server and trying to build a site throws an error "Couldn't find or load config".
To Reproduce
fornax new
)dotnet-tools.json
with instructions to install fornax locallydotnet tool restore
anddotnet fornax build
Couldn't find or load config
.Expected behaviour
The site should build.
Build Output
Below is the output from TravisCI. The same problem occurs on Azure Pipelines as well as Netlify.
Notice that the working directory contains a
config.fsx
.Additional Thoughts
Fornax works as expected locally with the globally installed dotnet tool, as well as with the locally installed dotnet tool. It seems that on these CI servers, the directory which
dotnet fornax build
is being run from is not the same as the directory which is being passed into the build process (i.e. this path fromDirectory.GetCurrentDirectory()
).The text was updated successfully, but these errors were encountered: