0
0

Node.jsインストール(nodenv)

Last updated at Posted at 2024-01-25

前提

anyenvがインストールされていること

nodenvをインストールする

anyenv install nodenv
exec $SHELL -l

nodenvを使ってNode.jsをインストールする

ここでは最新バージョンのNode.jsをインストールする

node_version=$(nodenv install --list | egrep '^[0-9]+\.[0-9]+\.[0-9]+$' | tail -n 1)
nodenv install ${node_version}
nodenv global ${node_version}
nodenv rehash
node -v
出力
v21.6.1
npm -v
出力
10.2.4
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0