A complete log of this run can be found in问题解决

安装依赖总是报错安装不上,但是在 https://www.npmjs.com/里有最新发布的版本,最终发现是npm的问题:

[root@localhost VehicleExhaust_vue]# npm install [email protected] --save
npm ERR! code ETARGET
npm ERR! notarget No matching version found for [email protected]
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-08-26T09_22_30_937Z-debug.log

A complete log of this run can be found in问题解决_第1张图片
解决方案:

全局更新
npm install npm -g
或者用淘宝镜像命令
cnpm install npm -g

A complete log of this run can be found in问题解决_第2张图片
在运行npm install 就成功安装上了。

你可能感兴趣的:(vue)