devtool icon indicating copy to clipboard operation
devtool copied to clipboard

Cannot install on Mac OS X

Open onury opened this issue 8 years ago • 6 comments

Mac OS X, v10.11.5 Node v4.4.3 NPM v3.10.2

npm install devtool -g
/usr/local/bin/devtool -> /usr/local/lib/node_modules/devtool/bin/index.js

> [email protected] install /usr/local/lib/node_modules/devtool/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/usr/local/lib/node_modules/devtool/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" is installed via remote

> [email protected] postinstall /usr/local/lib/node_modules/devtool/node_modules/electron-prebuilt
> node install.js

Downloading electron-v1.1.1-darwin-x64.zip
[============================================>] 100.0% of 41.73 MB (366.08 kB/s)
/usr/local/lib/node_modules/devtool/node_modules/electron-prebuilt/install.js:22
  throw err
  ^

Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/devtool/node_modules/electron-prebuilt/electron-tmp-download-16977-1467642782907/electron-v1.1.1-darwin-x64.zip' -> '/Users/oy/.electron/electron-v1.1.1-darwin-x64.zip'
    at Error (native)
/usr/local/lib
`-- (empty)

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "devtool" "-g"
npm ERR! node v4.4.3
npm ERR! npm  v3.10.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs electron-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls electron-prebuilt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/oy/npm-debug.log
npm ERR! code 1

onury avatar Jul 04 '16 14:07 onury

Have you tried a more recent version of node/npm? e.g. node 6.2 and npm 3.8.

mattdesl avatar Jul 04 '16 20:07 mattdesl

I cannot use a non-LTS Node version. But I updated node to latest LTS v4.4.7 And updated NPM to latest v3.10.3

result is the same.

onury avatar Jul 04 '16 22:07 onury

It looks to be a permissions problem, possibly in the electron-prebuilt module or possibly because you don't have adequate permission when running the install command.

mattdesl avatar Jul 04 '16 22:07 mattdesl

I run it with sudo.

sudo npm install devtool -g

same result.

onury avatar Jul 04 '16 22:07 onury

i got a same problem , i uninstall and install again ,still can not work. the ERR info was `npm ERR! Darwin 15.5.0 npm ERR! argv "/usr/local/Cellar/node/6.1.0/bin/node" "/usr/local/lib/node_modules/cnpm/node_modules/.bin/npm" "--userconfig=/Users/wanganming/.cnpmrc" "--disturl=https://npm.taobao.org/mirrors/node" "--cache=/Users/wanganming/.cnpm" "--registry=https://registry.npm.taobao.org" "--node-gyp=/usr/local/lib/node_modules/cnpm/node_modules/node-gyp/bin/node-gyp.js" "install" "devtool" "-g" "-dd" npm ERR! node v6.1.0 npm ERR! npm v2.14.22 npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] postinstall script 'node install.js'. npm ERR! This is most likely a problem with the electron-prebuilt package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node install.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs electron-prebuilt npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm ERR! npm owner ls electron-prebuilt npm ERR! There is likely additional logging output above.`

anming-john avatar Jul 06 '16 13:07 anming-john

Try:

rm -rf ~/.electron 
mkdir ~/.electron
chmod 777 ~/.electron/ 
sudo npm -g install electron-prebuilt
sudo npm -g install devtool 

Ehesp avatar Sep 16 '16 08:09 Ehesp