Error on compilation Webpack 4
rlopzc opened this issue · 4 comments
I'm using the released version 4.5.0.
ERROR in ./src/elm/Main.elm
Module build failed: Error: Compiler process exited with error Compilation failed
events.js:182
throw er; // Unhandled 'error' event
^
Error: spawn /Users/romario/Repos/personal/elm-webpack-4/node_modules/elm/Elm-Platform/0.18.0/.cabal-sandbox/bin/elm-make ENOENT
at _errnoException (util.js:1026:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
at onErrorNT (internal/child_process.js:374:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:667:11)
at startup (bootstrap_node.js:201:16)
at bootstrap_node.js:626:3
at ChildProcess.<anonymous> (/Users/romario/Repos/personal/elm-webpack-4/node_modules/node-elm-compiler/index.js:142:27)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:927:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
@ ./src/static/index.js 1:12-34
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server webpack-dev-server/client?http://localhost:8080 ./src/static/index.js
Removing node_modules and installing again helped.
I had the same issue. We use yarn and I updated the dependency in package.json and ran yarn install
- so it did update the elm-webpack-loader
but seems like it didn't run additional scripts that builds elm compiler binaries(?).
Maybe similar problem rails/webpacker#420
Feels like you should close this now, as new issues should probably be posted as a new issue in fact
For me the problem was actually that, Because I had created the project with the create-elm-app There was one of the initially modules created by the create-elm-app that was using this library https://package.elm-lang.org/packages/krisajenkins/remotedata/latest/RemoteData which was conflicting with the Http 2.0.0 when the Http 2.0.0 was a direct dependency . When I created the project I installed the elm/http dependency at the end end the version 1.0.0 was picked up automatically. So what I did was delete all dependencies and first install the core (http, html...) first and then I was able to get the http 2.0.0 but I got this problem.