6

I installed nodejs first with nvm but it didn't work as I expected. When I installed it with LTS version sudo yum -y install nodejs, it worked but I'm not able to find the version of node.

node -v
-bash: /root/.nvm/versions/node/v8.11.3/bin/node: No such file or directory

I tried to remove nvm but still getting the same message.

Pransh Tiwari
  • 3,983
  • 1
  • 32
  • 43
Zacle
  • 73
  • 1
  • 1
  • 8

3 Answers3

5

Use the traditional command

node --version

OR

node -v

If nodejs -v is working and above solutions not, refer this: symbolic-link-error

Pransh Tiwari
  • 3,983
  • 1
  • 32
  • 43
1

Try following code ->

$ node -v

Anu
  • 183
  • 1
  • 3
  • 10
0

In the command line just type the following

node --version

or you can use this code

node -v
Sreeram TP
  • 11,346
  • 7
  • 54
  • 108