DEV Community

Lumin
Lumin

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

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

Top comments (0)

nextjs tutorial video

📺 Youtube Tutorial Series

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay