Node keeps reverting back to older version

Viewed 3357

Every time I restart vagrant in my console it will ask me my login details and then say Now using node v7.10.0 (npm v4.2.0). When I do run nvm install node I get

v13.11.0 is already installed. Now using node v13.11.0 (npm v6.13.7)

... but then I exit and come back and it's v7.10.0 again. This is causing problems with my rails apps when I try to create them because it says the latest version isn't installed, and then I have to install Yarn and it won't find it. A whole mess, not sure what to do.

2 Answers

You can run the following command to set v13.11.0 as default

nvm alias default v13.11.0

This works for me.

Maybe try to switch the Node version. Do nvm ls Which would give you a list of installed NodeJS versions. Then do nvm use v13.11.0 Then set it to default using: nvm alias default 13.11.0

Should solve your problem

Related