作为webpack的初学者,你肯定也踩到了这个坑。

项目名称是 webpack,所以在初始化的时候会生成一个package.json文件,这个文件里有个name属性,他就是你的项目名称,当安装通过npm install webpack安装webpack 的时候就会报错,表示重名了。

把项目package.json文件的name属性改一下就可以了,然后在安装就成功了

Refusing to install package with name "webpack" under a package npm ERR! also called "webpack". Did you name your project the same npm ERR! as the dependency you're installing?

 

 

相关文章:

  • 2022-12-23
  • 2021-05-08
  • 2021-10-03
  • 2022-01-15
  • 2021-12-15
  • 2021-07-24
  • 2022-01-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-10
  • 2020-01-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案