parcel-plugin-fable icon indicating copy to clipboard operation
parcel-plugin-fable copied to clipboard

Issue when building with cache and NuGet dependencies

Open slogsdon opened this issue 7 years ago • 1 comments

When building a project with cache present and NuGet dependencies, some modules (internal and external) throw errors during compilation:

🚨  /Users/shane.logsdon/.nuget/packages/fable.elmish/1.0.1/fable/program.fs: Cannot resolve dependency './cmd.fs' at '/Users/shane.logsdon/.nuget/packages/fable.elmish/1.0.1/fable/cmd.fs'
    at /Users/shane.logsdon/Code/javascript/fable-browser-notes/node_modules/browser-resolve/node_modules/resolve/lib/async.js:55:21
    at load (/Users/shane.logsdon/Code/javascript/fable-browser-notes/node_modules/browser-resolve/node_modules/resolve/lib/async.js:69:43)
    at onex (/Users/shane.logsdon/Code/javascript/fable-browser-notes/node_modules/browser-resolve/node_modules/resolve/lib/async.js:92:31)
    at /Users/shane.logsdon/Code/javascript/fable-browser-notes/node_modules/browser-resolve/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:166:21)
Condition always false [0:8,6]
Dropping unreachable code [0:16,4]
Dropping side-effect-free statement [0:24,4]
Condition always true [0:28,4]
Dropping unreachable code [0:34,2]
ERROR: /Users/shane.logsdon/Code/javascript/fable-browser-notes/src/Counter/Types.fs doesn't belong to any of loaded projects []
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1379.Invoke(String message)
   at [email protected](Tuple`2 _arg1)
ERROR: /Users/shane.logsdon/Code/javascript/fable-browser-notes/src/Home/Types.fs doesn't belong to any of loaded projects []
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1379.Invoke(String message)
   at [email protected](Tuple`2 _arg1)
ERROR: /Users/shane.logsdon/Code/javascript/fable-browser-notes/src/Counter/State.fs doesn't belong to any of loaded projects []
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1379.Invoke(String message)
   at [email protected](Tuple`2 _arg1)
ERROR: /Users/shane.logsdon/Code/javascript/fable-browser-notes/src/Home/State.fs doesn't belong to any of loaded projects []
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1379.Invoke(String message)
   at [email protected](Tuple`2 _arg1)
ERROR: /Users/shane.logsdon/.nuget/packages/fable.elmish/1.0.1/fable/cmd.fs doesn't belong to any of loaded projects []
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1379.Invoke(String message)
   at [email protected](Tuple`2 _arg1)

slogsdon avatar Jan 27 '18 02:01 slogsdon

~To make things more interesting, this happens when attempting to convert the Elmish React template output from webpack to parcel, but does not happen when adding new packages to this project's included example.~

Edit: this ended up being incorrect. Adding Fable.React only did not cause the issue, but once Fable.Elmish and Fable.Elmish.React were added, the issue returned:

ERROR: /Users/shane.logsdon/.nuget/packages/fable.elmish/1.0.1/fable/program.fs doesn't belong to any of loaded projects []
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1379.Invoke(String message)
🚨  src/../../../../../.nuget/packages/fable.elmish/1.0.1/fable/program.fs: /Users/shane.logsdon/.nuget/packages/fable.elmish/1.0.1/fable/program.fs doesn't belong to any of loaded pr
ERROR: /Users/shane.logsdon/.nuget/packages/fable.elmish.react/1.0.0/fable/react.fs doesn't belong to any of loaded projects []
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1379.Invoke(String message)
   at [email protected](Tuple`2 _arg1)

slogsdon avatar Jan 27 '18 03:01 slogsdon