When compiling a project including .fsi files something with paths seems to get messed up.
My current project includes .fsi files in a folder-structure. So the real path of the file would be something like C:\dev\fsharp-data-adaptive\src\FSharp.Data.Adaptive\Datastructures\Index.fsi but fable keeps looking for it in C:\dev\fsharp-data-adaptive\Datastructures\Index.fsi and complains that the file doesn't exist.
Create a repo with .fsi files in a project-folder or clone https://github.com/fsprojects/FSharp.Data.Adaptive and remove the $(MSBuildThisFileDirectory) from FSharp.Data.Adaptive.fsproj
when using FSharp.Data.Adaptive simply start a webpack-dev-server and the error looks like this:
ERROR in ../Demo/Fable/Fable.fsproj
Module build failed (from C:/dev/fsharp-data-adaptive/node_modules/fable-loader/index.js):
Error: Could not find a part of the path 'C:\dev\fsharp-data-adaptive\Datastructures\Index.fsi'.
at Loader.command.then.data (C:\dev\fsharp-data-adaptive\node_modules\fable-loader\index.js:98:22)
at process._tickCallback (internal/process/next_tick.js:68:7)
I can add <Compile Include="$(MSBuildThisFileDirectory)Datastructures\Index.fsi" /> and everything works nice, but this sadly doesn't work when packaging the project as nupkg (with fable-folder included)
expected: paths should be correct 馃榾
actual: they aren't
the problem can be avoided by setting changing the current-directory to the project folder...
Thanks for the detailed report @krauthaufen! This made it much easier to spot the problem. I've just published fable-compiler 2.4.4 with a fix, could you please try it? Cheers!
works!!!
thank you lots 馃榾
Most helpful comment
works!!!
thank you lots 馃榾