Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check the backward compatibility of my node app with node version

How can I check what's the oldest (not latest) version of Node can my application work on? Is there a package or a Node utility which can tell me this information?

like image 259
Arihant Avatar asked Oct 28 '25 03:10

Arihant


1 Answers

No, in node.js there is the process.versions property to tell you what version you are running, for example:

Number(process.version.match(/^v(\d+\.\d+)/)[1])

if process.version is 'v0.11.5', then get 0.11 (Number)

But there is no package to tell you what's the oldest version of node your app can work on. You will have to figure it out on your own through testing, preferably unit test, in order to check the different version of node and the affect on your app. Then use the process version to match those findings.

like image 68
Barr J Avatar answered Oct 29 '25 16:10

Barr J



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!