Experience-Monks/devtool

Cannot install on Mac OS X

onury opened this issue · 6 comments

onury commented

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

> fsevents@1.0.12 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

> electron-prebuilt@1.1.1 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! electron-prebuilt@1.1.1 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-prebuilt@1.1.1 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

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

onury commented

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.

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.

onury commented

I run it with sudo.

sudo npm install devtool -g

same result.

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! electron-prebuilt@1.1.1 postinstall: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-prebuilt@1.1.1 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.`

Ehesp commented

Try:

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