Fixing The Gyp Error For NPM
This is going to be a short article. Not much of an educational post but more of a straight to the point solution post.
For the previous article on installing asdf
https://servingniches.org/posts/2021-08-14_thegreatestpackagemanager/
While installing the latest version of NodeJS into an existing repo using asdf, I ran into the gyp error when trying to run npm install
.
The fix for it was simple. Delete existing node_modules
and the package-lock.json
file. The package-lock.json file was generated with an older version of NodeJS. Run npm install
and everything should work perfectly this time.
Appendix
Originally published at https://servingniches.org.