1
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?

nvmのインストール(MacBook Air, M1, 2020)

Last updated at Posted at 2024-11-07

はじめに

Macにnvmをインストールしていきまーす

開発環境

  • MacBook Air, M1, 2020
  • nvm 0.39.7

導入

1.ターミナルを開きます

2.nvmをインストールします

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

3.~/.zshrcを編集します

$ vi ~/.zshrc
.zshrc
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

4.変更を反映させます

$ source ~/.zshrc

5.nvmがインストールされていることを確認します

$ nvm -v
0.39.7

6.Node.jsをインストールします

$ nvm install 18.19.0
$ nvm use 18.19.0

7. Node.jsのバージョンを確認します

$ node -v
v18.19.0

お疲れ様でした

1
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
1
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?