以下是我最新的错误。我不能添加超过2个链接到一个问题所以我作弊,xx = http
project mmf3jj$ sudo npm install && bower install
npm WARN package.json UPS_WEM@0.0.1 No license field.
/usr/local/lib/node_modules/bower/lib/node_modules/update-notifier/node_modules/configstore/index.js:53
throw err;
^
Error: EACCES: permission denied, open '/Users/mmf3jj/.config/configstore/update-notifier-bower.json'
You don't have access to this file.
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at Object.create.all.get (/usr/local/lib/node_modules/bower/lib/node_modules/update-notifier/node_modules/configstore/index.js:34:26)
at Object.Configstore (/usr/local/lib/node_modules/bower/lib/node_modules/update-notifier/node_modules/configstore/index.js:27:44)
at new UpdateNotifier (/usr/local/lib/node_modules/bower/lib/node_modules/update-notifier/index.js:35:17)
at module.exports (/usr/local/lib/node_modules/bower/lib/node_modules/update-notifier/index.js:120:23)
at Object.<anonymous> (/usr/local/lib/node_modules/bower/lib/bin/bower.js:140:20)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
我做了以下事情:
{
"directory": "library",
"registry": "xxs://github.com/angular/bower-angular.git/",
"proxy":"xx://username:password@PROXY_IP:PROXY_PORT",
"https-proxy":"xx://username:password@PROXY_IP:PROXY_PORT"
}
更新
我按照Apple说明关闭了新的安全设置。这得到了npm和其他一切工作,但是凉亭仍然存在这个问题。
Machintosh: user$ sudo bower install
bower ESUDO Cannot be run with sudo
Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.
http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814
You can however run a command with sudo using --allow-root option
Machintosh:folder user$ bower install
/usr/local/lib/node_modules/bower/lib/node_modules/update-notifier/node_modules/configstore/index.js:53
Error: EACCES: permission denied, open '/Users/user/.config/configstore/update-notifier-bower.json'
You don't have access to this file.
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at Object.create.all.get (/usr/local/lib/node_modules/bower/lib/node_modules/update-notifier/node_modules/configstore/index.js:34:26)
at Object.Configstore (/usr/local/lib/node_modules/bower/lib/node_modules/update-notifier/node_modules/configstore/index.js:27:44)
at new UpdateNotifier (/usr/local/lib/node_modules/bower/lib/node_modules/update-notifier/index.js:35:17)
at module.exports (/usr/local/lib/node_modules/bower/lib/node_modules/update-notifier/index.js:120:23)
at Object.<anonymous> (/usr/local/lib/node_modules/bower/lib/bin/bower.js:140:20)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
答案 0 :(得分:0)
我过去遇到同样的问题,这是因为公司代理使用的是NTLM身份验证。 Bower和NPM都提出了这个代理的问题,我必须编写一个级联代理来向客户端工具提供更标准的身份验证方法。
答案 1 :(得分:0)
我不确定是否是代理问题,您是否尝试以root用户身份执行这两项命令,例如:
sudo su
npm install && bower install