4

At the moment npm install/build are using with node 8.9.4 (and with npm 5.6.0). And during deploying some code it always reinstall modules and I spend a lot of time. I know that it should cache packages but it doesn't work. So I want to update my node version and make the version 16.11.0 (with npm version 8.0.0) as stable. Because when I make nvm list it shows me with the green arrow near 8.9.4. Also when I make node --v it also shows me version 8.9.4.

So how I can update the node version to 16.11.0 in my project? Also it should be available for other developers. When they open the project and start npm install/build it should use node 16.11.0 with npm 8.0.0.

2
  • This link should help - stackoverflow.com/questions/29349684/… Commented Oct 11, 2021 at 12:30
  • If your entire team uses nvm, you can specify the required version in a .nvmrc file. On the command line, run nvm use with no extra argument and it'll pick up whatever is defined in that file. Commented Oct 11, 2021 at 12:41

2 Answers 2

1

I think you need to specify engines in package.json Just specify the node version or node range - you are expecting your stuffs to work on.

Sign up to request clarification or add additional context in comments.

Comments

0

The following post may help you: How to change to an older version of Node.js

Also, every developer will have to make sure they are running the correct version of node, since we have no way to "require" a specific version of node in package.json, unless you write code to manually enforce that during application startup. In that case, Check for current Node Version

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.