Fixing The Gyp Error For NPM

Anup Vasudevan
Oct 20, 2021

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

Pixabay Image Source

Originally published at https://servingniches.org.

--

--

Anup Vasudevan

Hi there! I’m a software developer based out of Boston, MA. Worked at DSW, T-Mobile, HMH, Wellington Management, Thesys CAT and Autodesk to name a few.