ernestscomputer:musicomp ernest son$ npm install
> bufferutil@1.2.1 install /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/bufferutil
> node-gyp rebuild
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/include/node'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/src'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/uv/include'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/v8/include'
make: *** [Release/obj.target/bufferutil/src/bufferutil.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/Cellar/node/5.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/bufferutil
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:bufferutil@1.2.1 bufferutil@1.2.1 install: `node-gyp rebuild`
npm WARN install:bufferutil@1.2.1 Exit status 1
> utf-8-validate@1.2.1 install /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/utf-8-validate
> node-gyp rebuild
CXX(target) Release/obj.target/validation/src/validation.o
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/include/node'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/src'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/uv/include'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/v8/include'
make: *** [Release/obj.target/validation/src/validation.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/Cellar/node/5.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/utf-8-validate
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install: `node-gyp rebuild`
npm WARN install:utf-8-validate@1.2.1 Exit status 1
Delete your
$HOME/.node-gyp
directory and try again.Aside, many tools don’t handle spaces in path names well (
/Users/ernest son/...
).I had similar issues on Ubuntu 14.04, after trying everything here I finally solved it by running:
sudo apt-get install build-essential
As is recommended here: https://nodejs.org/en/download/package-manager/
Yikes. It scares me to think how low-level this is that a machine restart is a potential solution…
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!For me, just deleting the
~/.node-gyp
folder, then runningnpm update
on my project solved the problem (without rebooting). Thank for the trick!same problem here with contextify.
Closing, looks like this issue ran its course.
I already had build-essential installed, installing libkrb5-dev did the trick for me:
apt-get install libkrb5-dev
Also on High Sierra. Initially installed Node via homebrew which installed 10.0.0.
In order to get
npm install
working I had to:brew uninstall node
brew unlink node
brew install node@8
brew link --overwrite --force node@8
How is the issue closed when it’s clearly still a problem?
This is your problem.
which libtool
should print/usr/bin/libtool
. Yours is probably a not-quite-compatible one in, e.g.,/usr/local/bin
. Try this:Running node
6.2.0
here and getting gettingnode-gyp
error. Anyone had this issue with this version of node.js ?sudo npm cache clean -f sudo npm install -g n sudo n 8.11.1 try this @mesqueeb
Hey , A little help required here. i am not able to figure out the error while installing realm. Following is the output
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
.For me, after I Downgrade the node’s version it works finally.
$ brew install node@8
// install node8$ brew unlink node
// unlink old one$ brew link node@8
// link node version 8$ brew link --overwrite --force node@8
// force link version 8Here are two reference page about Downgrade Node and force link to node 8.
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.
Node v5.2.0
Switching from node
v12.3.1
tov8.16.0
withnvm
solved this for me.Thanks @belvederef 🎉
Running
npm audit fix
ornpm audit fix --force
solved the problem for meIts been 4 years now, and still this issue remains??
I can confirm, installing node LTS 8.x.x solves all the issues.
I got the same error and I solved by running the following command:
sudo npm install -g node-gyp@3.4.0
Nodejs - v7.2.0 Npm - 4.0.3
Thanks @aroc I removed
~/.node-gyp
and~/.npmrc
. In my project I removednode_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
Interesting to note that this issue still persists. After attempting all the possible combinations of solutions (modify
~/.npmrc
, remove~/.node-gyp
, clear the npm cache, deletenode_modules
and even restart the system), what worked with me was downgrading the node.For me the error mentioned the version numbers like:
I believe the versions mentioned in the log for node and node-gyp are incompatible. So I reverted to an older node version which worked like a charm.
npm install -g node@11.10.0
There should be a clear documentation describing breaking changes and compatibility issues between the two.
just downgrade node version 8 on mac
I’m on MacOS HighSierra. So I had this issue today, and it was because I was using the Node 10.0, had to downgrade to lts Node 8.11.1 and everything does work.
I don’t know why but I found a solution and worked for me every time. Just simply install build-essential
Yes same here also… node v6.2.1 with Windows OS
I tried many suggestions and the only thing that worked is @JxnGraphix solution. Steps are:
Finally… Wew!
Update: I encountered it again and instead of doing the above, this solution (symlinking node to nodejs) worked for me also.
In my setup, the error was a python one. I has a conda environment activated that used python 3.6, while the code required 2.7
If you don’t want to change your conda setup, this will allow you to go through with the installation:
PATH=/usr/bin:$PATH yarn install
Otherwise just run without conda enabled, or switch to a 2.7 environement.
Platform: OSX 10.14.3 node: 11.11.0 yarn: 1.13.0 conda: 4.6.7
Here as well, node v6.2.1
so redelete $HOME/.node-gyp and also .npmrc? logout and try again? I already restarted after user name change…
Downgrade to a once semi-usable version of NodeJS (v8^) and delete node v10^ artifacts:
It will work with
npm install
andyarn install
then. I should note that I also installedbuild-essentials
andlibkrb5-dev
as per comments above, AND have set the python version to 2.7 like so:npm config set python /usr/bin/python2.7
, just because I was following along with all the comments and trying everything.No restart was necessary.
What a sad, sorry state we’ve driven the industry into when it’s more complex to “compile” a bunch of code written in a toy language than it was to parse punch cards in the 1970s or develop a censorship-resistant world computer.
I did yarn instead of npm install…and it worked
Same here, node v6.2.1
@novarac23 I’m getting it with node
6.1.0
I also deleted the
node_modules
directory I had (including.node-gyp
and all), solved my issue. No restart.getting same problem here when trying to install
ember-cli
In my case, I removed
package-lock.json
andnode_modules
folder. andnpm install
tada! everything works finei had solved this by downgrading the node and npm versions
Before versions:
node - v10.14.2 npm - 6.5.0
i had downgraded to below versions
After versions :
node - v8.11.3 npm - 5.6.0
this issue will be resolved,please try if any one still facing the issue
After switching to a new NodeJS version using
n
I got this issue as well (I usually do when switching versions…)This did the trick for me:
Dang it I just don’t have luck with Node these days.
I tried to downgrade the version to
4.x.x
and removednode-gyp
and removednode-modules
from the project and still nothing… 😢Only @punitnathani’s solution worked for me. Downgrade from node@12.x.x
to
npm install -g node@11.10.0
After trying a gazillion things, only @punitnathani’s solution worked for me.
I am not seeing here any concrete answer for this Problem.
sudo npm i
ahahahha god damn, try opening terminal with right click 😄
I was missing g++, this fixed it for me
sudo yum install gcc gcc-c++
This is still an issue for CentOS 6+ @madhurangaonbit I followed the instructions on this SO post and managed to resolved node-gyp:
http://stackoverflow.com/questions/36327805/how-to-install-gcc-5-3-with-yum-on-centos-7-2
Cheers.
@aroc It doesn’t helped for me 😦
@timbergus That is not a
node-gyp
issue. Whatever module you are compiling needs to be updated to work with Node.js 12.npm install --global --production windows-build-tools
solved my problemWhy this issue is closed an still occur ? I tested on two version, node 8 and 10 and is the same issue. This is unacceptable. After 4 year nobody found a solution for this ? Not even a workaround, nothing work. Shame !!
This problem has to do with the system. It’s going to happen on a 32-bit system. try 64-bit
This worked for me: (Ubuntu)
sudo apt install libavahi-compat-libdnssd-dev
for me helped: apt-get install libkrb5-dev
thanks @samgranger
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!
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…
Nothing of what suggested above worked for me, however, I solved my issue switching to a different node version (e.g. using nvm).
@kukoman: No, upgrade
node-sass
to the latest version (4.12.0 (atw), see https://www.npmjs.com/package/node-sass).This has done the job Node 12.1.0, npm 6.9.0 Remove
node-gyp
Update tonode-sass 4.12.0
npm update
npm audit fix --force
As for me, I got such error in Gitlab CI pipeline
npm install
command execution. I suppose it occured because of security vulnerabilities in project dependencies. (Locally everything worked as it should).Found out about the cause of error after deleting
package.lock.json
file, commit&push to the origin and succeeded pipeline with npm warning about missing .lock file.Fixed it by:
package.lock.json
file andnode_modules
directory;npm install
;npm audit fix
;package.lock.json
file;I fix this disabling pyton3 by default in my shell config.
This is what worked for me on Windows:
Just in case anyone else wants to try a different solution, installing g++ with
sudo apt-get install g++
solved this issue for me.Worked for me
npm install node-gyp --python=python2.7
npm install web3 --python=python2.7
Additionally, the S3 bucket of a dependancy was down, so I had to manually install
npm install fsevents
@gibfahn Used your solution here (https://github.com/nodejs/node-gyp/issues/809#issuecomment-356900158) and it worked like a charm. Thanks so much!
Full installation
node-gyp@3.4.0
on Ubuntu 16 withnode 4.4.5
:I hope it will help somebody
Yep, that just adds the ppa, does an
apt-get install
ofnodejs
andnpm
, and then doessudo apt-get install build-essential
, giving younode
,npm
, and the required build tools.honestly i didn’t read all of the stack traces here but i found in a line of mine, that something did not found the g++ lib. So i installed that and then it works for me.
sudo apt-get install g++
Worked for me
EDIT: System: “Ubuntu 14.04.5 LTS” Node: per NVM 4.7.0 NPM: 2.15.11
Had a problem with this rebuilding node-sass, deleting
~/.node-gyp
andnpm update
did it for me.Maybe you need to log out and log in again? It’s also possible that
$HOME/.npmrc
has some outdated variables.used nvm and downgraded to node v11.10.0, which solved my problem
same here, I had to recreate the whole project
On Fri, 24 May 2019 at 12:18, Francesco Belvedere notifications@github.com wrote:
This error is still bothering me and I’ve spent way too much time with finding a solution without having to reinstall Windows. If anyone is having trouble installing a specific package and don’t have time to fix this error, I found a work around by just using another package manager; switching to
yarn add package-name
worked for me. I will eventually reinstall windows to fix this error, which is annoying.I had to downgrade my node version, I used nvm as suggested by @knoxcard and it worked.
I tried by upgrading or downgrading the version of node , but nothing helped. There was a mismatch between the version which I was installing and the versions mentioned in package.json file.
I tried installing the version specified in package.json file to new path by removing all the exisiting paths. It solved my problem.
I received the following error:
memwatch-next@0.3.0 install: node-gyp rebuild
A few lines below it, I received this error which I failed to read:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Solution: Installed xcode
Running this solved the problem for me.
I was using node v11 as default from homebrew, and downgrading to node@10 works! thanx
This worked for me: (original comment by @dwieeb)
https://github.com/ionic-team/ionic-cli/issues/3127#issuecomment-387791251
It is a list of things I tried.
sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential npm install -g node-gyp sudo npm install -g node-gyp sudo apt-get install gcc-5 These things did not become a means to solve the problem.
I had similar errors popping up while trying to install node-sass. In my case I had to run the command under root privileges:
@shershen08 Have you googled this part of the error
make: g++: Command not found
?You are dancing with python, I wasn’t when I had that error so it might be different
@andrewMuntyan Are you on macOS? I think your error is https://github.com/nodejs/node-gyp/issues/1454 which has been fixed in node-gyp 3.6.3 (via https://github.com/nodejs/node-gyp/pull/1455).
@GheorgheP I very much suspect might be same thing happening to me. I’m on Node 10. Didn’t have issues on the 8 or 6.
But well, I’m not going back an inch though. Will wait till it comes up to speed with Node
I had a problem with node version Wasn’t working on 10.0.1 something like that, nor was it working on 8.1.3 but it worked on 9.11.1
Anyway, check your node version 😄
Ubuntu 16: sudo apt-get install libudev-dev managed to get my npm install running without issue.
@richtera, I ran into this problem too and fixed it by downgrading from npm
5.8.0
to5.7.0
. See here: https://github.com/npm/npm/issues/20163The thread is huge because it’s too general (I
npm install
’d a module and something went wrong).Nothing to do with node-gyp, that’s an npm issue, and it’s documented here: https://docs.npmjs.com/getting-started/fixing-npm-permissions
the same problem occur with me i solve it with first step 1_ install python 2.7 2_ i added new path to environoment install with python 2.7 location
I’m trying to reproduce this locally…
sorry, i didn’t read all of the above, but if your .npmrc has a path to python try removing it and running
node-gyp rebuild
again, this resolved the issue for me… this was after i rannpm uninstall -g node-gyp && npm install -g node-gyp && rm -rf .node-gyp/
but i think just removing the path in my .npmrc was all that really mattered.note: i use nodenv with node v6.9.2 / npm v3.10.9
Problem exist with following configuration as well: node -v: 7.3.0 npm -v: 4.1.1
macOS Sierra Version 10.12.2
But it works with node 6.9.2.
@jasonwr thankz
On Windows 10 ubuntu bash, installing build-essential using
apt-get install build-essential
and rerunningnpm install
solves the problemHad the same issue and nothing would work. Finally had to go to node 0.10.26 on the pi.
Used NVM instead of direct node install.
@bnoordhuis - I believe this should be more helpfull :
This is a ubuntu box, node v4.4.4 npm v2.15.1
Having a very similar issue with the Bcrypt package on a win7 box: node v6.3.0 npm 3.10.3
Thanks for looking into this.
To solve this I downgraded node to
v5.12.0
, removed~/.node-gyp
folder and reinstalled node modules.