Question

How I download and extract different Node versions?

Connected Tutorial
This question is a follow-up to this tutorial:

I tried using a static app using a fairly complex static app. It exited on a crypto library because I it requires a different node version. This is what was extracted [2021-06-04T00:32:32.768927749Z] —> Downloading and extracting Node v16.3.0

I want to get it to say "Downloading and extracting Node v12.18.

Is that doable? Or, do I need a docker droplet?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there,

There has been a similar question here.

This is configurable in your package.json file use the engines property. More info here

Here is an example of the engines property for the current Node LTS version:

{ 
  "engines" : { 
    "node" : "12.19.0" 
  }
}

Here is another example of the engines property that span between inclusive Node versions v12 to v14:

{ 
  "engines" : { 
    "node" : ">=12.0.0 <=14.0.0" 
  }
}

Regards, Bobby Source.

As I understand you want to use Node v12.18 on the app platform. You can do this by defining the Nodejs version in your package.json file,

Here is an example of the property of the engine for the current Node LTS version:

{ 
  "engines" : { 
    "node" : "12.18.0" 
  }
}