I have a node app deployed and it uses the latest LTS version of node by default. I would like it to run npm version 7 instead of 6 since it is faster. Is there a way to specify which version of npm is used?
Hey Jon,
We don’t currently support this using our native Node environment. You’ll need to use your own Dockerfile to install a different NPM version.
We also needed to use npm 7.
Instead of switching to a Dockerfile you can do the following:
Add an environment variable SKIP_INSTALL_DEPS=true
(not documented yet on render doc as I understand)
In your build command: npm install npm && npx npm ci
Cheers
1 Like
You can also specify a different Node version as per Specifying a Node Version | Render if you have the freedom to do so with your app.
Each version of Node comes bundled with a specific version of NPM. You can find the mapping here: Previous Releases | Node.js