Webpack packaging error: cannot find module ‘webpack / bin / config yargs’ error reason, [email protected] Step on the pit~

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: