nrm使用问题

nrm 切换源失败

报以下错误

1
Error: EPERM: operation not permitted, scandir '/Users/mac/.Trash'

现象是: 项目本地看到的是在 taobao 源上,nrm use XX,切换不成功,还是停留在 taobao 源上;但是全局 terminal 打开的控制台却已经在 XX 源上。

原因:项目本地的.npmrc 文件里写死了在淘宝源上,优先级最高,导致切换不成功,也可以通过cat ~/.npmrc 命令查看全局;./.npmrc 命令查看当前目录下的。

Powered by Hexo and Hexo-theme-hiker

Copyright © 2013 - 2024 HL's Blog All Rights Reserved.

UV : | PV :