Phong Duong


Set required Node version for your application

07-01-2021 | #nodejs

You can require the Node version that your application will run on. You do that by specifying the node version in the engines property of your application's package.json.

{ "engines" : { "node" : "14" } }

When you specify 14 for the node property like above, npm will require that the Node version running on your machine is 14. You can use the range of versions for this property.

You can also set the required version for Yarn and npm to specify which version will install your application.

Share: TwitterFacebookLinkedInHacker News