2015-11-19 32 views
4

我现在更新和运行 节点V5.0.0 NPM v3.3.6如何修复错误“admin用户不允许访问包”

在Mac(酋长)

当我现在在我的项目上运行“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 

我没有看到任何解决方案围绕网络呢?我尝试了sudo而不是sudo,并没有什么区别。

有什么建议吗?

回答

12

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

npm set registry "https://registry.npmjs.org/" 

,然后再npm i

我用sinopia作为注册表。 Sinopia无法使用有限范围的软件包。

+0

谢谢,这个答案帮了我很多,它的一个耻辱,即sinopia不能使用这个包:( –

相关问题