OSPX 10.11上で、グローバルにelectronをインストールする問題
1077 ワード
user@userdeMacBook-Pro:~/$sudo npm install-g electron
//usr/local/bin/electron-)/usr/local/lib/node_modules/electron/cli.js
>[email protected]/usr/local/lib/node_modules/electron
>node install.js
Downloading electron-v 1.4.5-darwin-x 64.zip
===========================================================>100.0%of 42.06 MB(801.05 kB/s)
//usr/local/lib/node_modules/electron/install.js:22
throw err
^
Error:EACCES:permission denied、link'/usr/local/lib/node_modules/electron/electro n-tmp-download-321-4784825943/electron-v 1.4.5-darwin-x 64.zip'-'/Users/user/electron/electron-v 1.4.5-darwin-x 64.zip'
at Error(native)
npm ERRDarwin 15.6.0
npm ERRargv「/usr/local/bin/node」「/usr/local/bin/npm」「install」「-g」「electron」
npm ERRnode v 6.9.1
npm ERRnpm v 4.0.1
npm ERRcode EIFFECYCLE
npm [email protected]:`node install.js`
npm ERRExit status 1
解決方法:
//usr/local/bin/electron-)/usr/local/lib/node_modules/electron/cli.js
>[email protected]/usr/local/lib/node_modules/electron
>node install.js
Downloading electron-v 1.4.5-darwin-x 64.zip
===========================================================>100.0%of 42.06 MB(801.05 kB/s)
//usr/local/lib/node_modules/electron/install.js:22
throw err
^
Error:EACCES:permission denied、link'/usr/local/lib/node_modules/electron/electro n-tmp-download-321-4784825943/electron-v 1.4.5-darwin-x 64.zip'-'/Users/user/electron/electron-v 1.4.5-darwin-x 64.zip'
at Error(native)
npm ERRDarwin 15.6.0
npm ERRargv「/usr/local/bin/node」「/usr/local/bin/npm」「install」「-g」「electron」
npm ERRnode v 6.9.1
npm ERRnpm v 4.0.1
npm ERRcode EIFFECYCLE
npm [email protected]:`node install.js`
npm ERRExit status 1
解決方法:
rm -rf ~/.electron
mkdir ~/.electron
chmod 777 ~/.electron/
sudo npm -g install electron