Updating Nodejs on mac

0 votes

I'm using macOS Big Sur and would like to upgrade my Node. However, after downloading and installing the file from the official website, my terminal still displays and uses the old node version.

Is there anyone who can help me solve this problem?

image

Thanks

Jun 16 in Node-js by Vaani
• 7,020 points
7 views

1 answer to this question.

0 votes

I recommend that you use nvm. It's a lot easier and eliminates the hassle of updating.

nvm

To do this, you can install nvm. https://github.com/nvm-sh/nvm#installing-and-updating

you will be pasting in the curl command curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

Note: when this is finished running, you should see a line near the bottom which says something like export NVM_DIR="$HOME/.nvm"

Copy and paste this and hit enter.

Then check to make sure you have nvm installed now nvm -v

Nodejs update

After, in the terminal, type: nvm install node (you can also check your current version first with node -v

Run it and then check node version again. It should be updated.

npm

While you're at it, you can also update npm.

Check version npm -v Update npm install -g npm

This should do it. Let me know if there are any issues. Note: this can all be done in the -zsh shell, no reason to move back to bash.

answered Jun 17 by Neha
• 8,560 points

Related Questions In Node-js

0 votes
0 answers

updating nodejs on ubuntu 16.04

When I used the node -v command ...READ MORE

6 days ago in Node-js by Vaani
• 7,020 points
10 views
0 votes
1 answer

Error:Nodejs cannot find installed module on Windows

Hello @kartik, Add an environment variable called NODE_PATH and set ...READ MORE

answered Jul 15, 2020 in Node-js by Niroj
• 82,720 points
2,569 views
0 votes
1 answer

File Download on NodeJS with use opensubtitles API

The problem is the charset output (default ...READ MORE

answered Jun 7 in Node-js by Neha
• 8,560 points
35 views
0 votes
1 answer

NodeJS express get request is not working on mobile

For your API call, try to add ...READ MORE

answered Jun 7 in Node-js by Neha
• 8,560 points
25 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
971 views
0 votes
1 answer
0 votes
0 answers

How to install Node 14 version on windows?

I'm trying to install Node.js 14 on ...READ MORE

Jun 21 in Node-js by Vaani
• 7,020 points
7 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP