When installing webpack, the following error will be reported
English translation:
1. Refuse to install the package named "webpack" (also known as "webpack")
2. Also known as "webpack". Did you name the project the same name as the dependencies being installed?
Analyze the reasons:
The reason is that when initializing the project package.json, npm init -y sets the name to webpack by default, resulting in the same name as the webpack dependent package installation, so the error
solution is:
It can be solved by replacing the name attribute of package.json with a name other than webpack