Create a new project, and the webpack reports an error when the project starts. The error is as follows: cannot find module ‘webpack/bin/config yargs’
The version number of my local webpack is 5
Many methods have been searched on the Internet, and almost all of them have been uninstalled webpack webpack-cli webpack-dev-server But it didn’t succeed.
Reason: This is the current version of webpack dev- [email protected] I won’t support it [email protected]
Then lower the version number of the webpack.
The version of webpack can be installed as 3xxx.
Conclusion: the version of webpack CLI and webpack dev server can be solved as long as it is 3. X.x. the version of webpack is greater than 4. X.x.x and is not supported
Similar Posts:
- [Solved] [email protected] Error: Cannot find module ‘webpack/bin/config-yargs‘
- WebPack Task Runner
- Webpack introduces HTML webpack plugin and reports an error
- Building for production… ERROR TypeError: Cannot read property ‘createHash‘ of undefined
- [Solved] Webpack Error: [webpack-cli] Unable to load ‘@webpack-cli/serve’ command
- [Solved] Error: Rule can only have one resource source (provided resource and test + include + exclude) in {
- Vue configures the compression-webpack-plugin to package and compress JS and CSS Error
- [Solved] IView NPM run dev run error: TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
- [Solved] Webpack webpack-dev-server Page Error: cannot get/
- Cannot findmodule’webpack-cli/bin/config-yargs