node-gyp rebuild failing on Windows 7 x64 with VS2008 express #9
Comments
Copy link Quote reply
ameyp commented Apr 30, 2014
pribilinskiy commented May 17, 2014
kevinsawicki commented May 19, 2014
@pribilinskiy Were you using vs 2008 as well?
pribilinskiy commented May 20, 2014
Gethe commented Jul 10, 2014
I’m getting the same error too. VS2013
maxorxy commented Jul 11, 2014
This is the error message I get every time I try to install the package «atom-color-highlighting» in atom.
serkandurusoy commented Jul 20, 2014
The same here with atom-color-highlighting. Here’s the bug report I’ve posted over there.
abe33 commented Aug 1, 2014
The problem seems not just limited to window, I got two issue in just one week on OSX and Linux:
It seems there’s also compilation issues with nan.
FlavorScape commented Sep 9, 2015
same. errors all abound with installing on osx with node 4
flyfishMT commented Nov 20, 2015
Windows 10, VS 2015 —
\node_modules\highlights\node_modules\first-mate\node_modules\oniguruma>if not defined npm_config_node_gyp (node «C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin. \node_modules\node-gyp\bin\node-gyp.js» rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the «/m» switch.
TRACKER : error TRK0005: Failed to locate: «CL.exe». The system cannot find the
file specified. [\node_modu
les\highlights\node_modules\first-mate\node_modules\oniguruma\build\oniguruma.v
cxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command «node» «C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js» «rebuild»
gyp ERR! cwd \node_modules\highlights\node_modules\first-mate\node_modules\oniguruma
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv «C:\Program Files\nodejs\node.exe» «C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js» «install»
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
FlavorScape commented Nov 20, 2015
this is an old old version of node. i was having issue like this and gave in and upgraded all my deps. using node 4.x now
Windows 10, VS 2015 —
\node_modules\highlights\node_modules\first-mate\node_modules\oniguruma>if not defined npm_config_node_gyp (node «C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin. \node_modules\node-gyp\bin\node-gyp.js» rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the «/m» switch.
TRACKER : error TRK0005: Failed to locate: «CL.exe». The system cannot find the
file specified. [\node_modu
les\highlights\node_modules\first-mate\node_modules\oniguruma\build\oniguruma.v
cxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command «node» «C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js» «rebuild»
gyp ERR! cwd \node_modules\highlights\node_modules\first-mate\node_modules\oniguruma
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv «C:\Program Files\nodejs\node.exe» «C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js» «install»
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
—
Reply to this email directly or view it on GitHub #9 (comment).
flyfishMT commented Nov 20, 2015
I updated to 4.2.2 and npm 3.4.1 and still get it —
TRACKER : error TRK0005: Failed to locate: «CL.exe». The system cannot find the file specified. [\node_m
odules\oniguruma\build\oniguruma.vcxproj]
.
npm ERR! node v4.2.2
npm ERR! npm v3.4.1
Barryrowe commented Nov 30, 2015
This occurs for me on as well with Node 5.0.0 and npm 3.4.1 on Windows 7
Both VS2013 and VS2015 are installed and MSBuild v14.0 is being picked up (see error below)
shawumu commented Feb 1, 2016
@Barryrowe .I encounter the same problem when I was build the VSCode
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
trying to ‘npm install’, getting node-gyp rebuild errors #809
Comments
Copy link Quote reply
sunnee5150 commented Nov 9, 2015
sunnee5150 commented Nov 9, 2015
back story: in trying to uninstall iojs and reinstall node, I entered a world of shizzao but finally got node and npm installed successfully. I tried installing node-gyp globally to no avail.
bnoordhuis commented Nov 9, 2015
Delete your $HOME/.node-gyp directory and try again.
Aside, many tools don’t handle spaces in path names well ( /Users/ernest son/. ).
sunnee5150 commented Nov 9, 2015
sorry, when you say «$home» do you essentially mean usr/local/bin? that’s what «which node-gyp» yields in term. or do you mean another location?
I did change my user name by eliminating space for «_». thanks for the heads up
bnoordhuis commented Nov 9, 2015
I mean the HOME environment variable. 🙂 node-gyp normally downloads the development tarballs to $HOME/.node-gyp , i.e., /home/username/.node-gyp or /Users/username/.node-gyp .
sunnee5150 commented Nov 9, 2015
thanks, i figured out what you meant. just tried npm install and it appears i still have rebuild issues. it looks as though my user rename didn’t propogate..(?)
bnoordhuis commented Nov 9, 2015
Maybe you need to log out and log in again? It’s also possible that $HOME/.npmrc has some outdated variables.
sunnee5150 commented Nov 9, 2015
so redelete $HOME/.node-gyp and also .npmrc? logout and try again? I already restarted after user name change.
bnoordhuis commented Nov 9, 2015
Maybe just edit your .npmrc in case it contains valuable things like tokens.
sunnee5150 commented Nov 9, 2015
i see a .rvmrc folder in $HOME, but no .npmrc. and how exactly would I edit it (if I could find it)?
bnoordhuis commented Nov 9, 2015
If you don’t have a .npmrc, don’t worry about it. If you do, just vim will do; it’s a text file.
sunnee5150 commented Nov 9, 2015
I don’t have one. any other ideas? I think I’ve tried everything on our
list
On Mon, Nov 9, 2015 at 1:39 PM Ben Noordhuis notifications@github.com
wrote:
If you don’t have a .npmrc, don’t worry about it. If you do, just vim will
do; it’s a text file.
—
Reply to this email directly or view it on GitHub
#809 (comment).
mmahalwy commented Nov 9, 2015
getting same problem here when trying to install ember-cli
neoadventist commented Nov 10, 2015
same problem here with contextify.
sunnee5150 commented Nov 11, 2015
for me, the solution was fixing the space in my home folder (that was a whole other «can o’ worms»). then ‘npm install’ worked like a charm. also, I suggest reaching out to the folks at npm if it truly is npm related. They’re great!
midhunadarvin commented Nov 29, 2015
I also had the node-gyp rebuild error while installing utf-8-validate package through npm. Removing the space from my filepath worked for me.
kevinSuttle commented Dec 16, 2015
aroc commented Dec 16, 2015
Ok, so I do not have a space in my filepath. I deleted the
/.node-gyp folder and then the
/.npmrc file. Restarted my computer. Then tried again and it worked. Hope that helps someone else out there!
irudoy commented Dec 16, 2015
@aroc It doesn’t helped for me 🙁
JxnGraphix commented Dec 16, 2015
Thanks @bnoordhuis! I had the same issue with no spaces in my file path. Deleting the original node_modules folder from my project, then deleting .node-gyp (I did not have .npmrc), restarting, and installing node in my project again with (sudo npm install) worked with no errors.
kevinSuttle commented Dec 16, 2015
Yikes. It scares me to think how low-level this is that a machine restart is a potential solution.
UriKatz commented Dec 22, 2015
I had similar issues on Ubuntu 14.04, after trying everything here I finally solved it by running:
sudo apt-get install build-essential
samgranger commented Jan 8, 2016
I already had build-essential installed, installing libkrb5-dev did the trick for me:
apt-get install libkrb5-dev
ByScripts commented Jan 22, 2016
For me, just deleting the
/.node-gyp folder, then running npm update on my project solved the problem (without rebooting). Thank for the trick!
josephgodwinkimani commented Jan 25, 2016
Run into same error when trying to download dependencies for angular-phonecat . I solved it by using @bnoordhuis method just the same way @JxnGraphix put it.
barnash commented Feb 18, 2016
I also deleted the node_modules directory I had (including .node-gyp and all), solved my issue. No restart.
mylonasg88 commented Feb 22, 2016
/.npmrc . In my project I removed node_modules and restarted my machine (restart might not be necessary) and all worked great.
node v4.1.2
npm 2.14.4
OS X El Capitan
blin17 commented Feb 28, 2016
Thanks @JxnGraphix — your solution worked for me
timbergus commented May 7, 2019
Could be node-sass? It compiles every time I install it.
richardlau commented May 7, 2019
Could be node-sass? It compiles every time I install it.
timbergus commented May 7, 2019
Thanks, @richardlau. I will try to follow node-sass node@12.x compatibility issues.
Rafael-Ramblas commented May 8, 2019
This has done the job
Node 12.1.0, npm 6.9.0
Remove node-gyp
Update to node-sass 4.12.0
npm update
npm audit fix —force
eduardomart commented May 21, 2019
After trying a gazillion things, only @punitnathani’s solution worked for me.
kukoman commented May 22, 2019 •
tried pretty much every suggestion and nothing works :/ anyone has a working solution without downgrading node?
strarsis commented May 22, 2019
@kukoman: If it is node-sass , upgrading it ( node-sass ) usually solved these issues for me.
kukoman commented May 22, 2019
@strarsis did try to downgrade node-sass, removing it, reinstalling, deleting cache, removing and reinstalling gyp. still no joy :/
strarsis commented May 22, 2019 •
@kukoman: No, upgrade node-sass to the latest version (4.12.0 (atw), see https://www.npmjs.com/package/node-sass).
hakoiko commented May 23, 2019
In my case,
I removed package-lock.json and node_modules folder. and npm install
tada! everything works fine
belvederef commented May 24, 2019 •
Nothing of what suggested above worked for me, however, I solved my issue switching to a different node version (e.g. using nvm).
mrpandat commented May 26, 2019
Switching from node v12.3.1 to v8.16.0 with nvm solved this for me.
nbeers22 commented Jun 9, 2019
used nvm and downgraded to node v11.10.0, which solved my problem
woprandi commented Jun 12, 2019
I always have a problem to rebuild a old ember app despite a yarn.lock because of this package, unacceptable.
strarsis commented Jun 12, 2019
@woprandi: The system itself differs from the one where the bindings compilation worked,
so it fails, this shouldn’t happen, but this package has this kind of issue.
You could try to install the app dependencies inside a VM/container that runs on an older *nix distribution (from which you know that it worked in the past) and hopefully it compiles.
pthornhi commented Jun 14, 2019
Only @punitnathani’s solution worked for me. Downgrade from node@12.x.x
npm install -g node@11.10.0
Daisuke-sama commented Jun 16, 2019
For me as well @pthornhi . I had spent, probably, a few days for experiments.
shaikh-shahid commented Jun 18, 2019
Follow these steps to resolve the issue.
1: Make sure you have build-tools installed.
2: Update node-gyp
3: Delete package-lock.json and node modules folder and run npm install again.
4: Deleting
/.node-gyp folder and run npm install again.
mikkz commented Jun 20, 2019
For those who are using AMI 2, I resolve it using
sudo yum groupinstall «Development Tools»
Since my errors were
kendinikertenkelebek commented Jun 20, 2019
MagicScorpion commented Jun 20, 2019
I am getting below error while installing btlejuice.
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.19.0-kali4-amd64
gyp ERR! command «/usr/bin/node» «/usr/bin/node-gyp» «rebuild»
gyp ERR! cwd /usr/local/lib/node_modules/btlejuice/node_modules/bluetooth-hci-socket
gyp ERR! node -v v10.15.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
orwell1984 commented Jun 25, 2019
Gotta love hundreds of people checking in on a closed issue to no avail. Good maintainer ethics!
bzoz commented Jun 25, 2019
This page is for that specific issue from 3yrs ago, which was solved. It is not catch-all place for all node-gyp failures. If you have issues with building a node module: