NPM run dev</code bbb>ror: Cannot find module 'webpack-cli/bin/config-yargs'
// current package.json file
"devDependencies": {
"webpack": "^5.2.0",
"webpack-cli": "^4.1.0",
"webpack-dev-server": "^3.11.0"
}
Question Quote:
refer to: 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:
NPM install webpack-cli@3 -d </code bbb>/ ol> <>ode>
Webpack-dev-server ^3 requires webpack-cli ^3 installation
// package.json file
"devDependencies": {
"webpack": "^5.2.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
}
Think about:
If you encounter a problem, go to the Issues section of the GitHub project first and retrieve the related problem. It is much better than directly searching for unofficial solutions on Google.
Please feel free to reprint the original article. Wish to share with you and make progress together. – jiang coder
Read More:
- When starting Vue project: cannot find module ‘webpack cli / bin / config yargs’ error resolution
- [Solved] Webpack compilation Error: Cannot find module’webpack-cli/bin/config-yargs’
- [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 Solve Error: Cannot find module ‘webpack/lib/RequestShortener’
- NPM start project error: cannot find module ‘webpack’ problem solution
- How to Fix Webpack run error webpack dev server
- Taro Install Error: permission denied, symlink ‘../lib/node_modules/@tarojs/cli/bin/taro‘ -> ‘/usr/local/bin/tar
- webpack4 Use webpack-dev-server Error [How to Solve]
- NPM install error: Cannot find module ‘D:\zip\node_modules\npm\bin\npm-cli.js‘
- Webpack Error: Module build failed: TypeError: this.getOptions is not a function
- [Solved] Webpack error static heartbeat interval = 1000
- Cli Write Error: This is related to npm not being able to find a file. [Solved]
- Bin File Programming Failed, could not find core in coresight setup, erase error
- [Solved] npm Error: Error: Cannot find module ‘postcss-loader‘
- [Solved] Vite Project jenkins Auto Package Error: failed to load config from ../vite.config.js You installed esbuild on
- NPM run dev Error Module build failed: Error: Cannot find module ‘node-sass’
- [Solved] Vue cli version is @ Vue/cli 4.5.13, and sass is used to report an error
- Some problems encountered in the initial construction of Ant Design Pro project, such as cross Env, webpack and so on
- Ubutnu Qt Unable to start process Error: “make“ -f ‘ /usr/bin/ld: cannot find -lGL collect2: error: ld returned 1 exit sta