DEV Community

Pradeep Kumar
Pradeep Kumar

Posted on β€’ Edited on

41 1 1 1

Install Node on MacOS M1/M2/Apple Silicon

1. Create ~/.zshrc if not exist, using following command

touch ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

2. Download NVM

Get the latest version URL from:
https://github.com/nvm-sh/nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

3. Update .zshrc

Run

export NVM_DIR="$HOME/.nvm"
Enter fullscreen mode Exit fullscreen mode

OR

Open .zshrc: nano .zshrc and add the following line:

export NVM_DIR=~/.nvm
Enter fullscreen mode Exit fullscreen mode

Save and run:

source .zshrc
Enter fullscreen mode Exit fullscreen mode

Close the terminal and open it again.

3. Install Node

nvm install --lts
Enter fullscreen mode Exit fullscreen mode

Try running following command to verify versions:

node -v
npm -v
Enter fullscreen mode Exit fullscreen mode

Other useful commands

To check all available node version

nvm ls
OR
nvm ls-remote
Enter fullscreen mode Exit fullscreen mode

To install specific version

nvm install <version>
Enter fullscreen mode Exit fullscreen mode

eg:

nvm install v16.19.0
Enter fullscreen mode Exit fullscreen mode

Switch to specific version

nvm use <version>
Enter fullscreen mode Exit fullscreen mode

Set default node version

nvm alias default <version>
Enter fullscreen mode Exit fullscreen mode

Image of Timescale

πŸš€ pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applicationsβ€”without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post β†’

Top comments (5)

Collapse
 
sergeylitvin profile image
Litvin Sergey β€’

Thanks! It's working for me.

Collapse
 
ramospedro1421 profile image
Pedro Ramos β€’

Thank you! That helped me a lot!!

Collapse
 
sergnotes profile image
Serg.io β€’

Thank you! I was running into permission issues earlier, so I had to do a complete re-install using your instructions.

Collapse
 
blueorris profile image
blueorris β€’

Thanks! But for the step of adding path to the environment, I followed the official GitHub (which is shown at the top of this blog). That works for me.

Collapse
 
zayynahmedd profile image
Zain Ahmed β€’

Hey tysm. I am a total noob and this worked for me v easily. I initially was trying the Homebrew method on my Mac M2 but kept failing and didn't know why.

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up