DEV Community

Cover image for YOUR SOLUTION IS NVM
Clara Situma
Clara Situma

Posted on

YOUR SOLUTION IS NVM

So you've cloned a javascript framework repository, but soon as you try to run,"npm install", You're running into the following errors and warnings:

-npm ERR! gyp ERR! stack Error: Can't find Python executable "C:\Python27\python.exe", you can set the PYTHON env variable.

or

npm WARN deprecated

or
could not solve dependency

Your problem is that you're using a different node version than the cloned repository's and your solution is NVM.


How to install NVM for Windows, Mac and Linux

NVM is important because it allows developers to easily switch between different versions of Node(a popular JavaScript runtime environment.)

This is useful because different projects may require different versions of Node.js, and NVM makes it easy to switch between them without affecting other projects on the same system.

NVM solves this problem by providing a simple and consistent way to manage multiple versions of Node.js on the same system.

This can:

  1. Save time.

  2. Reduce developers' frustration by making it easier to use the version of Node.js that is best suited for each project.


How to install NVM for Windows, Mac and Linux

Top comments (4)

Collapse
 
johndalvik profile image
Akos Horvath • Edited

While nvm is really good, and I've used it for years, now I'm using fnm.
github.com/Schniz/fnm

Really similar (or even the same) commands, with the same support for .nvmrc, but built with Rust ,so much faster, and also comes with a really useful bash script, to change versions automatically on directory changes. That one I had to write myself for nvm.
Also fnm is cross-platform, not like nvm.

Collapse
 
csituma profile image
Clara Situma

okay, i'll check it out

Collapse
 
chaoocharles profile image
Chaoo Charles

Thank youu 👌

Collapse
 
csituma profile image
Clara Situma

Car ray bow :)