Wednesday, 15 March 2017

How to find what node version a project supports

Is there a way besides trial and error to detect what node version I should use on a repository ?

With the fast rise of web frameworks it's becoming a common need to go back to projects from 6, 12 or 24+ months ago. I've been doing this a lot in the last weeks and my process for detecting the correct node version has become:

git clone [REPO]
npm i
[build]
### if error
rm -r node_modules
nvm use 4, 5 or 6
npm i
[build]

I can't help but feel that there's something very basic I'm missing here. Thanks for any wisdom you can share with me!



via coiso

No comments:

Post a Comment