Reputation: 31
I wanted to check the version of node js on my machine. It gives two different numbers:
/usr/local/n/versions/node$ ls
14.16.1
/usr/local/n/versions/node$ node -v
v8.9.4
Are there two different versions?
Upvotes: 3
Views: 15351
Reputation: 5411
We can have different nodejs versions on the same machine, but there is only 1 active version for a user at the same time.
Your command node -v
give you the NodeJS active version, which is v8.9.4.
The ls
command give you only the content of the folder. NodeJS v14.16.1 is installed on your machine, but is not active.
Upvotes: 1