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

Ubuntu で Node の最新版/推奨版を使う (n コマンド編)

$
0
0
Ubuntu 20.04 に Node の最新版、安定版を切り替えて使うために n コマンドを導入します。 nコマンドは npm から導入できます。 nコマンド導入 ❯ sudo apt install nodejs npm ❯ sudo npm install n -g 推奨版(lts) のインストール ❯ sudo n lts installed : v16.13.0 (with npm 8.1.0) 最新版(latest)のインストール ❯ sudo n latest installed : v17.0.1 (with npm 8.1.0) 古い nodejs npm の削除 ❯ sudo apt purge nodejs npm 各バージョン 無事にインストールされましたか、バージョンを確認します。 ❯ npm -v 8.1.0 ❯ node -v v17.0.1 ❯ n --version v8.0.0 推奨版/最新版を切り替える (sudo n) sudo n で切り替えることができます。 カーソルキーで選択しリターンキーでインストールできます。

Viewing all articles
Browse latest Browse all 9134

Trending Articles