Error installing Contextify on OSX (Failed at the contextify@0.1.15 install script 'node-gyp rebuild')
ragegage opened this issue · 42 comments
npm ERR! contextify@0.1.15 install: node-gyp rebuild
npm ERR! Exit status 1
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>
voyce-member-portal@1.0.0 /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! contextify@0.1.15 install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the contextify@0.1.15 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.
Found this error when running npm install
Ubuntu 16.04, Node v7.0.0
Node 6.9.1 is OK!
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,
~~~~~ ^
Issue resolved with
node -v
v6.9.1
npm -v
3.10.8
@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.
Hi. same pbl on El Capitan,
$ npm -v ; node -v
4.1.1
v7.4.0
Same problem here, though it persists after downgrading node. Any other workarounds?
$ npm -v ; node -v
3.10.8
v6.9.1
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.
@HsuTing Node 7 must have removed that because on node 6.9.0 I get a deprecated warning instead.
Works for me with
$ npm -v ; node -v
3.10.10
v6.9.5
Seems like it doesn't support node 7 indeed.
@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.
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 usingbrew update
;
@willmendesneto The issue is 7.0.0 and higher. Solutions for 6.7.0 are invalid.
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
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 🤔
npm -v ; sudo node -v
4.4.4
v7.0.0
Same issue here
Same issue here
npm v4.8.0
node v7.8.0
Same here...
node v7.9.0
npm v4.2.0
Same here:
node: v 7.10.0
npm: 4.5.0
idem:
node: v7.9.0
npm: 4.5.0
Same
node --version
v7.10.0
npm --version
4.2.0
Same with node 7.3.0
Works with node 6.9.5
I have this issue:
npm -v ; node -v ;
5.0.3
v8.1.2
../src/contextify.cc:150:16: error: no member named 'SetAccessCheckCallbacks' in 'v8::ObjectTemplate'
otmpl->SetAccessCheckCallbacks(GlobalPropertyNamedAccessCheck,
~~~~~ ^
I am highly suspicious of permissions issues related to Xcode and Mac applications.
same issue
node -v ; npm -v;
v8.1.2;
v5.0.3
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
Reinstalling java seemed to have done something that makes re-installing work, and I'm too scared of breaking things to try and find out more.
In case this helps anyone, in my case (failing on SetAccessCheckCallbacks
) I tracked it down to an old version of jsdom
being pulled in by a dependency. Upgrading that version of jsdom
resolved it for me. evanw/packer#8
In case this is an optional dependency in your app, you can try npm install --no-optional
same issue
node -v ; npm -v
v8.2.1
5.3.0
macos 10.12.6
For me, on macos 10.12.6, the following node versions do not work: 8.1.0, 6.9.1, 6.9.5
This one does: 6.7.0
OS X 10.11.6, Node 8.0.0, npm 5.3.0
Same issue: OS X 10.12.6, Node 8.3.0, npm 5.3.0
Same issue: Win10, Node v8.4.0, NPM v4.1.1
Same with OS X 10.12.6, Node 8.4.0, npm 5.3.0
Sorry for the trouble everyone is having, but this is an unmaintained library, so it's unlikely that it'll be updated to work on newer versions of node. When I wrote it 6 years ago, contextify solved a bunch of issues with the vm
module in node. About 2.5 years ago, the bulk of the code was merged into node itself, so it's been unnecessary for a long time.
If you're stuck trying to install contextify, the best way forward is to figure out why it's being installed. If it's an out-of-date dependency (e.g. jsdom hasn't used contextify in a long time), then you may just need to update a package. If something actually relies on contextify, the easiest path forward would probably be to submit a PR to that package that uses the vm
module instead.
If it helps, I believe this is an issue with node > 7.0.0, I just rolled back to node LTS (6.11.3) with NVM and all is fine!
npm => 5.3.0
node => 8.5.0
Same issue here - solved by '--no-optional'
Thanks to @duhaime
"Dependencies
nodejs v0.10.26 (see package.json for npm dependencies). Some people have reported that v0.10.28 doesn't work but that switching to v0.10.26 does
Python (on Windows; version must be > 2.5 and < 3.0)"
You have to check the Python version. I solved this problem by Python 2.7.10.
As of npm 5.6.0 and node 9.3.0 am still getting this.. However have found the zombie library has a jsdom library which still has a contextify@0.1.15 dependency... Will see if I can remove that to proceed.
519 silly saveTree └─┬ zombie@2.5.1
519 silly saveTree ├── bluebird@2.11.0
519 silly saveTree ├─┬ debug@2.6.9
519 silly saveTree │ └── ms@2.0.0
519 silly saveTree ├─┬ eventsource@0.1.6
519 silly saveTree │ └─┬ original@1.0.0
519 silly saveTree │ └─┬ url-parse@1.0.5
519 silly saveTree │ ├── querystringify@0.0.4
519 silly saveTree │ └── requires-port@1.0.0
519 silly saveTree ├─┬ jsdom@1.4.0
519 silly saveTree │ ├── browser-request@0.3.3
519 silly saveTree │ ├─┬ contextify@0.1.15
519 silly saveTree │ │ ├── bindings@1.3.0
519 silly saveTree │ │ └── nan@2.8.0
That's a pretty old version of Zombie (from 2014 - https://github.com/assaf/zombie/releases/tag/v2.5.1). If you can update, that will probably remove the Contextify dependency.
I solved by updating my
"zombie": "^5.0.6"
in package.json. Zombie was bringing in an old jsdom which brought in contextify which brought in gyp.
I have this problem now!
I downgraded Node to v6.10.3 and tried others within v6.x.x.
I use Yarn.
My error:
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/contextify/src/contextify.o
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from ../src/contextify.cc:1:
In file included from /Users/aa/.node-gyp/6.10.0/include/node/node.h:42:
/Users/aa/.node-gyp/6.10.0/include/node/v8.h:21:10: fatal error: 'utility' file not found
#include <utility>
^~~~~~~~~
1 warning and 1 error generated.
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/aa/.nvm/versions/node/v6.10.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command \"/Users/aa/.nvm/versions/node/v6.10.0/bin/node\" \"/Users/aa/.nvm/versions/node/v6.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /Users/aa/Documents/app/node_modules/contextify
gyp ERR! node -v v6.10.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok"
info This module is OPTIONAL, you can safely ignore this error
AAs-MacBook-Pro:design_engine aa$ yarn start
This is seriously serious :(