npm install 安装包报错
PS C:\Users\happl\Desktop\vue-rou> npm install vue-router --save
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name “vue-router” under a package
拒绝在包下安装名为“vue router”的包
npm ERR! also called “vue-router”. Did you name your project the same
也称为“vue路由器”。你给你的项目起了同样的名字吗
npm ERR!
npm ERR! For more information, see:
有关详细信息,请参见
npm ERR! https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm
npm ERR! A complete log of this run can be found in:
此运行的完整日志可以在
npm ERR! C:\Users\happl\AppData\Roaming\npm-cache_logs\2019-12-09T15_55_28_112Z-debug.log
解决方法就是,修改package.json中的name名称,再重新执行安装命令即可。