以下是我的最新錯誤。我無法添加超過2個鏈接到一個問題,所以我作弊,XX = HTTP我無法通過我的公司代理獲取涼亭
project mmf3jj$ sudo npm install && bower install
npm WARN package.json [email protected] 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)
我也做了以下內容:
- 驗證了我的代理例外
- 公認的git //: 。
- 須藤混帳配置--global網址 「XXS://」 .insteadOf的git://
- 通過代理允許NPM
- 須藤NPM配置設置代理XX://用戶名:密碼@ PROXY_IP:proxy_port使用/
- 須藤NPM配置設置HTTPS代理XX://用戶名:密碼@ PROXY_IP:proxy_port使用/
- 雙重檢查我的道路
- 配置鮑爾代理
- 出口代理XX背後://用戶名:密碼@ PROXY_IP:proxy_port使用/
- 出口HTTPS代理XX://用戶名:密碼@ PROXY_IP:proxy_port使用/
- 編輯.bowerrc
。
{
"directory": "library",
"registry": "xxs://github.com/angular/bower-angular.git/",
"proxy":"xx://username:[email protected]_IP:PROXY_PORT",
"https-proxy":"xx://username:[email protected]_IP:PROXY_PORT"
}
UPDATE
我跟着蘋果的指示關閉新的安全設置。這有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)
問題的根源是我的操作系統。我正在運行MAC OS 10.11.xxx,El Capitan。在這個操作系統中,你不能改變/ usr/bin。有一個修復,一個是改變該設置,_不建議_。其他要下載最新版本的node.js。這將改變usr/local/bin的路徑,**推薦**。一旦我找出進行更新的過程,我會發布更新。 – Will