DEV Community

Teerasak Vichadee
Teerasak Vichadee

Posted on

Solved Node version on Mac M1

Node.js belowed v15 has a problem on Mac M1. We can't run legacy Node.js project with simply npm i.

What we have to do is:

1) Install Rosetta in our terminal

softwareupdate --install-rosetta 
Enter fullscreen mode Exit fullscreen mode

2) Make our terminal app run on Rosetta mode

by goto Application / iTerm (let's say we're using iTerm)
left click to show popup menu and click "Get info"
then tick on "Open with Rosetta"

3) Restart the terminal app

4) Check that we're using the right CPU

arch # it should return something like "i386" not "arm64"
Enter fullscreen mode Exit fullscreen mode

After that I can run nvm install 12 and npm i without any error

It's wotk on my end but I''m not sure about you guys or event my new Mac :D

Top comments (0)