Fix Gyp Error with NVM
Find the dependency that is depends on gyp
and remove it from your package.json file. then run npm install
. Commands like this will try find it for you but might not find it.
1
npm ls node-gyp
Mac shit
node-gyp
also requires x-code command line tools to be installed.
The install should work. Now you can install that package removed separately.
When you run npm install
after cloning a repo and you get the gyp ERR! not ok
this error can be caused by the node version you are running.
Prerequisites
nvm (node version manager) is installed
Check your node version
1
node -v
Fix NPM gyp ERR!
Change your node version
1
nvm use 14.18.0
Install different versions of node using NVM
1
2
3
nvm install 14.18.0
nvm use 14.18.0
node -v
This post is licensed under CC BY 4.0 by the author.
Comments powered by Disqus.