项目场景:

npm安装nrm时出现不是内部命令  明明安装成功了

npm install nrm -g


问题描述:

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated coffee-script@1.7.1: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated har-validator@5.1.5: this
D:\Software\node\node_global\nrm -> D:\Software\node\node_global\node_modules\nrm\cli.js
+ nrm@1.2.1
updated 1 package in 6.88s

解决方案:

可能原因

1.原因是资源的问题,要配置淘宝镜像

npm config set registry https://registry.npm.taobao.org

配置完成后检验是否成功

npm config get registry

重新安装

npm install nrm -g

查看是否安装成功

nrm ls

2.可能时没有配置全局的环境变量

具体可以参考下面这篇文章

https://blog.csdn.net/zhuzicc/article/details/101023144

 

 

 

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐