如何修复错误“不允许用户管理员访问包" [英] How to Fix Error "user admin is not allowed to access package"

查看:49
本文介绍了如何修复错误“不允许用户管理员访问包"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am updated now and running node v5.0.0 npm v3.3.6

在 Mac (El Capitan) 上

On a Mac (El Capitan)

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

When i run "npm install" on my project now. I get errors like this:

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 都没有区别.

Im not seeing any solutions to this around the web yet? I tried both sudo and not sudo and makes no difference.

有什么建议吗?

推荐答案

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

I had the same problem. Check the registry: npm config list. Try to run:

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

然后是 npm i.

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

I used sinopia as a registry. Sinopia can't work with scoped packages.

这篇关于如何修复错误“不允许用户管理员访问包"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆