Tuesday 19 December 2017

I'm having a brain fart - How can I lock a project to a specific nodejs version, where it will tell me "unsupported nodejs version" or something like that.

We have an older React project that was originally built on nodejs 4.2.0 and recently ran into an issue with a developer running LTS and it wouldn't compile/run.I swear i've seen it before where a project is cloned from git for example and when you run npm install if the nodejs version installed isn't supported it will tell you its not supported and wont install anything or at least warn you.I tried definining:"engines": { "node": ">=4.2.0" } in package.json which to my understanding would allow anything minor/patch and below, but stick to the 4x major version. Even with 6x it still installs things, am i missing something here?

Submitted December 19, 2017 at 10:45PM by ndboost

No comments:

Post a Comment