Is it possible to install NVM when I have already installed nodejs 8 on Ubuntu?
I have installed nodejs 8, I cannot run karma tests with angular 1 .. As stated on the official Karma site Note: Karma currently works on Node.js 0.10, 0.12.x, 4.x, 5.x, 6.x, and 7.x. See FAQ for more info.
, I think the problem might be in my version of node, they recommend installing node via NVM, but I have already installed node 8 .. is it possible to install nvm and include my current nodes there?
source to share
Q: Can I install nvm
when I already have an existing installation node
?
A: Yes.
nvm
works by changing the environment variable PATH
to determine the version the node
current shell session is using.
For example, when you do nvm use 6.10.3
, you can immediately see that the $ PATH parameter is set to;
PATH = / home / samuelt / .nvm / version / node / v6.10.3 / bin
which node
allows
/home/samuelt/.nvm/versions/node/v6.10.3/bin/node
Since it nvm
always tries to set its installation path node
as the first occurrences in PATH
, even if you have 10 other node installation paths in PATH
, the rest will be ignored after the system has found the binary node
.
Q: Can I include my installed copy of node as part of the installed node in nvm
?
A: In theory, this is possible. But I will say no. To install a specific version of node in nvm
, you can donvm install <version>
source to share