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:
Save time.
Reduce developers' frustration by making it easier to use the version of Node.js that is best suited for each project.
Top comments (4)
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.
okay, i'll check it out
Thank youu 👌
Car ray bow :)