0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?