如何修复错误"用户管理员不允许访问包"

Tim*_*Tim 5 npm

我现在更新并运行节点v5.0.0 npm v3.3.6

在Mac上(El Capitan)

当我现在在我的项目上运行"npm install"时.我得到这样的错误:

me:controls me$ sudo npm install
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/Cellar/node/0.10.36/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.0.0
npm ERR! npm  v3.3.6
npm ERR! code E403

npm ERR! user admin is not allowed to access package chai : chai
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/me/Dev/controls/npm-debug.log
Run Code Online (Sandbox Code Playgroud)

我没有在网络上看到任何解决方案呢?我尝试了sudo而不是sudo并没有任何区别.

有什么建议?

小智 14

我有同样的问题.检查注册表:npm config list.尝试运行:

npm set registry "https://registry.npmjs.org/"
Run Code Online (Sandbox Code Playgroud)

npm i一次.

我使用sinopia作为注册表.Sinopia无法使用范围包.