I try to understand with webpack and such error after such launch starts ./bin/webpack-dev-server
In another terminal. PLS help me.
`module.js:327
throw err;
^
Error: Cannot find module 'webpack'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
`
Have you run ./bin/rails webpacker:install?
@gauravtiwari yep
@gauravtiwari, I got this error. Can not find application.js in /home/andrew/railsapp/wpacktest/public/packs/manifest.json. Is webpack still compiling? And after I looked in Troubleshooting and executed the command ./bin/webpack-dev-server
You get that error because webpack isn't installed. Could you run this ./bin/rails webpacker:install again please and follow the options?
Btw, what version of webpacker you using? It's 1.1
Got same error. Decided this way:
./bin/rails webpacker:install and ./bin/yarn install.bin/webpack-dev-server.package.json:{
"devDependencies": {
"webpack-dev-server": "^2.4.2"
},
"dependencies": {
// another dependencies
"babel-core": "^6.24.0",
"babel-loader": "^6.4.1",
"webpack": "^2.3.2",
}
}
./bin/yarn install and bin/webpack-dev-server again.Check the prerequisites of webpacker 1.1 https://github.com/rails/webpacker#prerequisites
Would be nice if we could programmatically check these prerequisites and give the right error message on what to do.
On Apr 1, 2017, at 14:20, Bryan Lim notifications@github.com wrote:
Check the prerequisites of webpacker 1.1 https://github.com/rails/webpacker#prerequisites
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
@gambala, thx bro.
@gauravtiwari , sorr, i had node js ~4.v and after I upgraded to 6 all earned.
Most helpful comment
Would be nice if we could programmatically check these prerequisites and give the right error message on what to do.