webpack-cli: Cannot run webpack-cli after install
After trying to run “webpack-cli” for config migrating, I got this error output. macOS Sierra 10.12.6 npm v5.4.2 node v8.7.0 (installed via nvm) webpack-cli v1.3.9
npm i -g webpack-cli
webpack-cli migrate webpack.config.js
module.js:529
throw err;
^
Error: Cannot find module './utils/webpackOptionsSchema.json'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:476:23)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/dphov/.nvm/versions/node/v8.7.0/lib/node_modules/webpack-cli/dist/migrate.js:10:30)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 14
- Comments: 34 (13 by maintainers)
Do
npm install -g webpack-cli
, it should have1.4.0
now, reverted some things, as @ematipico did a PR forflow
that made the build broken, tried to fix it by adding compilation and stuff, so that we could supportv4
of node, will do some more investigating to make sure it works 100%. Sorry for the bug you guys had, having a hard time finding time for open source atm, as I’m working + full time student 😦As mentioned earlier, would be super-awesome if someone made a PR that fixes distribution and flow-compilation
@ev1stensberg The two solutions you presented
webpack-cli migrate ./webpack.config.js
and getting the version v.3.0.1 and above works like a charmI’m having this error when I try to run foreman:
Closing this per now, feel free to open a new issue if something comes up, I’m available for questions or elaboration anytime ❤️