A
A
Araj2021-04-10 10:42:39
Node.js
Araj, 2021-04-10 10:42:39

Is it possible to change node version with nvm locally in the same directory?

Hello!
There is a server on ubuntu with node version 7.9.
When starting a new project, it gives an error

npm ERR! Make sure you have the latest version of node.js and npm installed.

As I understand it, in order to raise a new project, I need to install a later version of the node.

For this purpose, I installed nvm.
But as far as I understand, the usual way nvm use node.version changes it globally.

A couple more old projects are running on the server, and there is no certainty that the global update of the node will be painless.

Therefore, I thought about the possibility of changing the version of the node only in the directory of the new project.
Can this be done with nvm?
Is it legal at all?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Slava Rozhnev, 2021-04-10
@Araj

I'm using n - Interactively Manage Your Node.js Versions Allows you to run the cad in the correct version of NodeJS

I
Igor Makhov, 2021-04-10
@Igorgro

You can try using docker, with it you can use any version of the node.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question