Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

node -v showing old version of node

I’m on MacOS, and I want my system to use the latest version of nodejs. I’ve installed the latest version of nodejs from the nodejs website.

node -v gives me: v14.15.0

Running where node in terminal gives me these 2 paths:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

/Users/GenTan/.nvm/versions/node/v14.15.0/bin/node

/usr/local/bin/node

I want to remove the v14.15.0, and only have the latest version of node on my system. What’s the safest way I can do this?

>Solution :

If you no longer wish to use NVM, you can uninstall it. That way, the only version of Node left in your PATH is the system version.

You could also keep NVM. If you do nvm ls you’ll see what versions you’ve got installed. One of them has a little arrow next to it, which is the current version. For example:

        v15.8.0
->      v16.0.0
        v18.4.0
         system
default -> 16.0 (-> v16.0.0)

Note there’s also one called system. If you switch to that one with nvm use system, you’ll use the one you installed yourself.

You can then use nvm alias default system to mark that as the default. When you then run nvm ls, you get:

        v15.8.0
        v16.0.0
        v18.4.0
->       system
default -> system
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading