Problems encountered during operation npm run dev
: Error: Cannot find module’webpack-cli/bin/config-yargs’
// package.json "devDependencies": { "webpack": "^5.2.0", "webpack-cli": "^4.1.0", "webpack-dev-server": "^3.11.0" }
Problem solving reference: Error: Cannot find module’webpack-cli/bin/config-yargs’ #1948
If you upgrade webpack to 5. *, and webpack cli to 4. *, an error will be reported:
Error: Cannot find module 'webpack-cli/bin/config-yargs'Temporary solution: Back off webpack cli to version 3. * for example:
"webpack-cli": "^ 3.3.12"
Solution:
-
Uninstall the current webpack-cli
npm uninstall webpack-cli
-
Install webpack-cli 3.* version
npm install webpack-cli@3 -D
// package.json "devDependencies": { "webpack": "^5.2.0", "webpack-cli": "^3.3.12", "webpack-dev-server": "^3.11.0" }
Read More:
- Error: cannot find module ‘webpack cli/bin/config yargs’‘
- When starting Vue project: cannot find module ‘webpack cli / bin / config yargs’ error resolution
- [Solved] webpack.config.js configuration encountered Error: Cannot find module’@babel/core’&&Cannot find module’@babel/plugin-transform-react-jsx’
- [Solved] Error: Cannot find module ‘webpack-cli/package.json‘
- How to Fix Webpack run error webpack dev server
- How to Solve Error: Cannot find module ‘webpack/lib/RequestShortener’
- webpack4 Use webpack-dev-server Error [How to Solve]
- NPM start project error: cannot find module ‘webpack’ problem solution
- Webpack Error: Module build failed: TypeError: this.getOptions is not a function
- [Solved] Webpack error static heartbeat interval = 1000
- Some problems encountered in the initial construction of Ant Design Pro project, such as cross Env, webpack and so on
- Cssssyntax error in webpack [How to Solve]
- How to Solve webpack -v View Error in vsode
- Webpack packaging error TypeError: this.getOptions is not a function at Object.lessLoader
- Webpack Pack and compress ES6 files with errors: ERROR in js/xxxxxx.js from UglifyJs Unexpected token punc ()
- NPM install error: Cannot find module ‘D:\zip\node_modules\npm\bin\npm-cli.js‘
- How to Solve Webpack CacheGroups Error
- Uncaught (in promise) Error: Delete success at __webpack_exports__.default 405 error
- How to Fix Node SASS Error in Vue + webpack project after nodejs upgrade
- [Solved] WebPack Error: Watchpack Error (watcher): Error: ENOSPC: System limit for number of file watchers reache