contextify icon indicating copy to clipboard operation
contextify copied to clipboard

Error installing Contextify on OSX (Failed at the [email protected] install script 'node-gyp rebuild')

Open ragegage opened this issue 10 years ago • 42 comments

npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1

ragegage avatar Apr 30 '16 16:04 ragegage

Here is a little more info for the above error:


gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack Error: spawn EACCES
gyp ERR! stack     at exports._errnoException (util.js:1012:11)
gyp ERR! stack     at ChildProcess.spawn (internal/child_process.js:302:11)
gyp ERR! stack     at exports.spawn (child_process.js:372:9)
gyp ERR! stack     at exports.execFile (child_process.js:139:15)
gyp ERR! stack     at checkPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:371:5)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:338:9
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:88:20
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/dan/work/Phase2/voyce/repo/node_modules/contextify
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
[email protected] /Users/dan/work/Phase2/voyce/repo
└── (empty)

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
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 contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs contextify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls contextify
npm ERR! There is likely additional logging output above.

danshumaker avatar Aug 08 '16 19:08 danshumaker

Found this error when running npm install Ubuntu 16.04, Node v7.0.0

Node 6.9.1 is OK!

yandongxu avatar Nov 03 '16 05:11 yandongxu

I have problem when run node-gyp rebuild. Mac OS X 10.12.1, Node v7.0.0

../src/contextify.cc:150:16: error: no member named 'SetAccessCheckCallbacks' in 'v8::ObjectTemplate'
        otmpl->SetAccessCheckCallbacks(GlobalPropertyNamedAccessCheck,
        ~~~~~  ^

HsuTing avatar Nov 09 '16 19:11 HsuTing

Issue resolved with node -v v6.9.1

npm -v 3.10.8

nishith1005 avatar Nov 14 '16 09:11 nishith1005

@brianmcd Are aware you of any fix for this except for downgrading node version. I am currently trying to work with node v7.1.0, npm v4.0.2 on macOS Sierra 10.12.1.

I know maintaining open source project is tough and I appreciate your efforts.

spidergears avatar Nov 20 '16 08:11 spidergears

Hi. same pbl on El Capitan,

$ npm -v ; node -v
4.1.1
v7.4.0

Samuel29 avatar Jan 19 '17 15:01 Samuel29

Same problem here, though it persists after downgrading node. Any other workarounds?

$ npm -v ; node -v
3.10.8
v6.9.1

dhowe avatar Feb 03 '17 12:02 dhowe

Temporarily downgrading Node via nvm works until you upgrade it again. Then node tells you to rebuild it, because it was compiled with a different version of Node.

LoganDark avatar Feb 21 '17 02:02 LoganDark

@HsuTing Node 7 must have removed that because on node 6.9.0 I get a deprecated warning instead.

LoganDark avatar Feb 21 '17 02:02 LoganDark

Works for me with

$ npm -v ; node -v
3.10.10
v6.9.5

Seems like it doesn't support node 7 indeed.

nderkach avatar Feb 21 '17 14:02 nderkach

@nderkach Rather the other way around; node 7 doesn't support contextify.

Instead, it seems to have been implemented as a native vm module. But npm modules still require this version, for some reason.

LoganDark avatar Feb 21 '17 17:02 LoganDark

I had the same problem and here is how I solved:

$ rm -rf node_modules
$ sudo npm install
$ npm start

For some cryptic reason, node-gyp requires something that's related to my sudo user. I'm investigating yet, but I'm sharing this here because this information could be useful for someone else.

Before that I did:

  • How I'm using nvm to manage NodeJS versions (Currently I'm using versions 4.3.2, 5.7.0 and 6.7.0) I removed and installed again;
  • How I notice that node-gyp uses tools like make, I updated my computer using brew update;

willmendesneto avatar Feb 23 '17 05:02 willmendesneto

@willmendesneto The issue is 7.0.0 and higher. Solutions for 6.7.0 are invalid.

LoganDark avatar Feb 23 '17 09:02 LoganDark

I was finally able to resolve this issue by adding node-gyp to my devDependencies:

yarn add -D node-gyp

or

npm install -D node-gyp

yale avatar Feb 23 '17 20:02 yale

npm -v ; node -v 4.1.2 v7.6.0

Still having this issue. Any solution besides adding it as a devDependency ? Seems too much of an overkill 🤔

pedroabreu avatar Apr 03 '17 13:04 pedroabreu

npm -v ; sudo node -v
4.4.4 v7.0.0

Same issue here

bathan avatar Apr 07 '17 19:04 bathan

Same issue here

npm v4.8.0 node v7.8.0

leonbold87 avatar Apr 11 '17 15:04 leonbold87

Same here...

node v7.9.0 npm v4.2.0

chadsaun avatar May 05 '17 16:05 chadsaun

Same here: node: v 7.10.0 npm: 4.5.0

LorneCurrie avatar May 07 '17 23:05 LorneCurrie

idem: node: v7.9.0 npm: 4.5.0

rohillion avatar May 13 '17 09:05 rohillion