Failing install on OS X Yosemite
lubomski opened this issue · 25 comments
seeing error when installing node package html-md; error log reporting contextify as the culprit
node 4.1.1
npm 2.14.4
14 errors 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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.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 /usr/local/lib/node_modules/contextify
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "contextify" "-g"
npm ERR! node v4.1.1
npm ERR! npm v2.14.4
npm ERR! code ELIFECYCLE
npm ERR! contextify@0.1.14 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.14 install script 'node-gyp rebuild'.
npm ERR! 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 their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/USERNAME/npm-debug.log
Full log: https://gist.github.com/lubomski/3e2b68254885ae2c0a9b
+1
+1
This is related to node 4.*
, switch to node 0.12.*
and install works fine.
switching to node 0.12.*
did not work for me :(, same issue however
I had the same problem, solved it by:
- Updating to the latest Xcode v7.0.1 (7A1001)
- Re-installed
node-gyp
.
$ rm -Rf node_modules
$ npm install node-gyp --reinstall -g
$ npm install
I hope it helps you @aschiopu
+1
All of the above solutions have not worked for me.
@GC-Max have you tried reinstalling node?
@mattmischuk Yes I was using 4. Then installed nvm and installed version 0.12.* and used that. Same issue
Using nvm
to install version 0.12.7
and then reinstalling fixed the issue for me.
With Node.js 4.1.2
, contextify
was failing to install until I rolled back to Node.js 0.12.7
(on OS X 10.11). This is really sad. Please fix.
I'm seeing the same issue on Mac OS 10.11 with node v4.1.2. I downgraded to Node v0.12.7 and the installation was successful.
+1
Breaks in node 4.0.*
. Downgraded to node 0.12.*
meanwhile.
$ node -v
v0.12.7
$ npm -v
2.14.4
$ node-gyp -v
v3.0.3
npm install contextify still breaks on node-gyp rebuild
You can downgrade easily with Homebrew:
brew uninstall node
brew install homebrew/versions/node012
Node v0.12 only worked for me when I upgraded OSX to 10.11.
+1
Downgrading to 0.12.7 via nvm works for now.
Working:
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.11
BuildVersion: XXXXXX
$ node -v
v0.12.7
$ node-gyp -v
v3.0.3
Fixed in 0.1.15
Nope, not really.
1770 verbose stack Error: contextify@0.1.15 install: `node-gyp rebuild`
1770 verbose stack Exit status 1
1770 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:232:16)
1770 verbose stack at emitTwo (events.js:100:13)
1770 verbose stack at EventEmitter.emit (events.js:185:7)
1770 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
1770 verbose stack at emitTwo (events.js:100:13)
1770 verbose stack at ChildProcess.emit (events.js:185:7)
1770 verbose stack at maybeClose (internal/child_process.js:821:16)
1770 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
1771 verbose pkgid contextify@0.1.15
1772 verbose cwd /vagrant
1773 error Linux 3.13.0-77-generic
1774 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "fabric" "--save" "--unsafe-perm" "--no-bin-links"
1775 error node v5.5.0
1776 error npm v3.3.12
1777 error code ELIFECYCLE
1778 error contextify@0.1.15 install: `node-gyp rebuild`
1778 error Exit status 1
1779 error Failed at the contextify@0.1.15 install script 'node-gyp rebuild'.
1779 error Make sure you have the latest version of node.js and npm installed.
1779 error If you do, this is most likely a problem with the contextify package,
1779 error not with npm itself.
1779 error Tell the author that this fails on your system:
1779 error node-gyp rebuild
1779 error You can get their info via:
1779 error npm owner ls contextify
1779 error There is likely additional logging output above.
1780 verbose exit [ 1, true ]
npm 3.3.12
node 5.5.0
node-gyp 3.2.1
@StephanBijzitter that's a problem with your environment, not contextify
@brianmcd how so? According to the contextify setup guidelines I meet every requirement.
https://github.com/nodejs/node-gyp#installation
Any other package reliant on node-gyp installs without issues; only this package refuses to install. In that sense, I would say it is at least related to contextify.
#!/usr/bin/env bash
echo "Updating APT database..."
sudo apt-get update -y || exit 1
echo "Installing APT packages..."
sudo apt-get install pkg-config libcairo2-dev libjpeg-dev libgif-dev -y
echo "Installing Ruby Gems..."
sudo gem install scss-lint
echo "Installing NodeJS..."
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - || exit 1
sudo apt-get install -y nodejs || exit 1
echo "Entering SuperUser mode..."
sudo su || exit 1
echo "Installing global NodeJS packages..."
npm install grunt-cli node-gyp -g || exit 1
echo "Installing local NodeJS packages..."
cd /vagrant || exit 1
rm -rf node_modules || exit 1
npm install || exit 1
cd - || exit 1
brianmcd@Brians-MacBook-Pro.local:~/scratch/test_install$ npm install contextify
> contextify@0.1.15 install /Users/brianmcd/scratch/test_install/node_modules/contextify
> node-gyp rebuild
CXX(target) Release/obj.target/contextify/src/contextify.o
SOLINK_MODULE(target) Release/contextify.node
/Users/brianmcd/scratch/test_install
└─┬ contextify@0.1.15
├── bindings@1.2.1
└── nan@2.2.0
brianmcd@Brians-MacBook-Pro.local:~/scratch/test_install$ node -v
v5.5.0
brianmcd@Brians-MacBook-Pro.local:~/scratch/test_install$ npm -v
3.3.12
brianmcd@Brians-MacBook-Pro.local:~/scratch/test_install$ node-gyp -v
v3.2.1
Could be related to installing everything as root.
I don't use sudo for this, see exactly the same error
npm ERR! node v5.11.0
npm ERR! npm v3.8.6
npm ERR! Failed at the contextify@0.1.15 install script 'node-gyp rebuild'.
+1