Quantcast
Channel: Node.jsタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 9229

M1 MacbookでNode.js環境構築

$
0
0

初macOSで操作方法すら良くわからない中、Apple Silicon(M1)搭載ということでNode.js環境の構築に一工夫が必要でした。M1対応するまではRosettaで回避するのが無難そう。homebrewもこれでインストールできました。

TerminalをRosettaで開く

Finder -> 移動 -> ユーティリティ

スクリーンショット 2020-11-22 17.31.01.png

command ⌘ + I

Rosettaを使用して開くにチェックして、Terminalを起動。

nvmをインストールする

https://github.com/nvm-sh/nvm#installing-and-updating

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash

一旦Terminalを終了して、再起動。

なぜか以下のようなwarningが出始めるが、落ち着いてググって解決する。#homebrewも同時にインストールしたからかな?

zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]?

Node.jsをインストール

nvm i v14.15.1
% npm -v
6.14.8
% node -v
v14.15.1

めでたし、めでたし

以上


Viewing all articles
Browse latest Browse all 9229