Cannot find module’webpack-cli/bin/config-yargs
$ yarn start
yarn run v1.22.10
$ webpack-dev-server --hot --config build/webpack.dev.js
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'webpack-cli/bin/config-yargs'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/Users/xxx/vue_demo/node_modules/webpack-dev-server/bin/webpack-dev-server.js:65:1)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The version is as follows:
...
"webpack-cli": "^4.0.0",
"webpack-dev-server": "^3.11.0",
Solution:
...
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0",
...
$ yarn start
yarn run v1.22.10
$ webpack-dev-server --hot --config build/webpack.dev.js
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'webpack-cli/bin/config-yargs'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/Users/xxx/vue_demo/node_modules/webpack-dev-server/bin/webpack-dev-server.js:65:1)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
...
"webpack-cli": "^4.0.0",
"webpack-dev-server": "^3.11.0",
...
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0",
...
Similar Posts:
- [Solved] [email protected] Error: Cannot find module ‘webpack/bin/config-yargs‘
- [Solved] Module build failed: Error: Cannot find module ‘node-sass’
- Webpack packaging error: cannot find module ‘webpack / bin / config yargs’ error reason, [email protected] Step on the pit~
- Causes and solutions of error reporting in require setting dynamic path
- [Solved] Vue installs less Error: Failed to compile with 1 errors
- Error: listen eaddinuse: 4000 [How to Solve]
- Module build failed: Error: Cannot find module ‘node-sass’
- [xviz] ./scripts/run-kitti-example.sh Excute Error: gyp ERR! Node-gyp failed to build your package.
- Cannot find module ‘../lib/utils/unsupported.js’
- [Solved] Webpack Error: [webpack-cli] Unable to load ‘@webpack-cli/serve’ command