An error is reported when starting Vue project: cannot find module ‘webpack cli/bin/config yargs’, as shown in the following figure:
the reason for this error is that the version of webpack and webpack dev server is incompatible. The solution is as follows:
input below the VUE project:
npm uninstall webpack -g
npm uninstall -g webpack-dev-server
uninstall and install:
npm install [email protected] --save-dev
npm install [email protected] --save-dev
Restart the project, success!
Read More:
- [Solved] Vue Project Error: Error: Cannot find module ‘webpack‘ Require stack以及Error: Rule can only have one resource so
- [Solved] Vue Start Project Error: ValidationError: webpack Dev Server Invalid Options
- [Solved] Vue Route Error: Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function
- The vue3 project Error: Cannot find module’vue-loader-v16/package.json’
- [Solved] Vue Error: Module build failed: Error: No PostCSS Config found in
- [Solved] Vue Less error: Webpack project report expected indentation of 0 spaces but found 2
- Vue init webpack Error: unable to verify the first certificate
- [webpack-cli] Error: Cannot find module ‘vue/compiler-sfc‘
- Vue project Run Error: Syntax Error: Error: Cannot find module ‘less‘
- Vue scaffold creation project and run error [Solved]
- [Solved] Error spawn CMD enoent errno when starting Vue project: – 4058
- ‘webpack dev server’ is not an internal or external command, nor is it a runnable program or batch file. Solution: error in cnpm run dev:
- How to Solve @Vue/cli3.X Using less Error
- [Solved] webpack Package Error: ERROR in multi ./src/main.js ./dist/bundle.js Module not found: Error: Can‘t resolv
- [Solved] Error: Cannot find module ‘@vue/cli-shared-utils
- [Solved] Webpack compile error: SyntaxError: Unexpected token =
- [Solved] Vue cli installation Fastclick Error
- vue.config.js build Package UglifyJsPlugin to clear console and print console.log Error: `warnings` is not a supported option
- [Solved] Error: Cannot find module ‘@vue/cli-shared-utils‘
- [Solved] Vue package error: Syntax Error: Error: Cannot find module ‘mozjpeg’