mark340
착하게살자
mark340
전체 방문자
오늘
어제
  • 분류 전체보기 (98)
    • 백준 (11)
    • 알고리즘 (1)
    • Javascript (17)
    • CS (18)
    • 기타 (9)
    • AI (1)
    • Angular (2)
    • Linux (14)

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

인기 글

태그

  • MySQL
  • oauth
  • JavaScript
  • Closure
  • parsing

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
mark340

착하게살자

Linux

Using NodeJs 14 with Mac Silicon (M1)

2023. 7. 12. 18:12


I have recently received a new MacBook Pro with the Mac Silicon chip. However, I noticed that I am unable to compile NodeJs Version 14 which I have to use due to some of my projects are still on Angular 11 and 12.

Unfortunately, there is no NodeJs 14 that is built for ARM64; Hence it has no support for the new Mac Silicon which is built around ARM64.

Fortunately, there is some workaround to get NodeJs 14 to work with Mac Silicon. Apple provides Rosetta, a translation app that allows applications that are built for Intel Chip (or previous generation Mac) to run under Apple Silicon.

Installing Rosetta

To install Rosetta, you need to:

  1. Open your terminal
  2. Paste and execute /usr/sbin/softwareupdate --install-rosetta --agree-to-license

And that's it!

Installing NodeJs 14

For any Node installation in Mac, I recommend you to use NVM. It allows you to easily swap between Node versions through CLI.

To install NVM:

  1. Open your terminal
  2. Paste and execute curl -o- <https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh> | bash
  3. Restart your terminal

You can confirm that NVM has been successfully installed by executing nvm command in your terminal.

Now, to get to the real deal on installing NodeJs 14, we will execute everything through terminal.

  1. Open your terminal
  2. Execute arch and confirm that at the moment it is returning arm64
  3. Execute arch -x86_64 zsh
  4. Execute arch and confirm that it is now returning i386
  5. Execute nvm install 14. NVM will install the latest NodeJs 14.
  6. Execute nvm use 14 to switch to NodeJs 14, if you have other NodeJs versions installed.

That's it, folks! You now are able to use NodeJs 14 with your new Mac.

저작자표시 (새창열림)

'Linux' 카테고리의 다른 글

macOS: 맥에서 SSH 키 생성하고 사용하기  (0) 2023.08.13
S3 CORS 헤더 관련 이슈 해결방법 (html2canvas, lottie)  (0) 2023.07.24
우분투 Node.js 설치및 npm 환경구축  (0) 2023.06.26
[Docker] Ubuntu 22.04 Docker 설치  (0) 2023.06.26
[Linux] nohup 사용법  (0) 2023.06.26
    'Linux' 카테고리의 다른 글
    • macOS: 맥에서 SSH 키 생성하고 사용하기
    • S3 CORS 헤더 관련 이슈 해결방법 (html2canvas, lottie)
    • 우분투 Node.js 설치및 npm 환경구축
    • [Docker] Ubuntu 22.04 Docker 설치
    mark340
    mark340
    착하게삽시다

    티스토리툴바