LoginSignup
0
0

More than 1 year has passed since last update.

しばらく使っていなかったNodeをアップデートする

Last updated at Posted at 2022-06-26

過去にダウンロードしていたNode.jsを現在の安定版に更新しました。
いずれまた使うのでメモしておきます。

homebrewのバージョンアップ

% brew update

% brew -v
Homebrew 3.5.2
Homebrew/homebrew-core (git revision e95d9224d91; last commit 2022-06-26)
Homebrew/homebrew-cask (git revision 9713bf8928; last commit 2022-06-25)

homebrewを最新版に更新完了

nodebrewのバージョンアップ

% brew upgrade nodebrew

% nodebrew -v
nodebrew 1.2.0

nodebrewも最新版に更新完了

node.jsのバージョンアップ(推奨版に)

現在の推奨版がv16.15.1なのでそれにバージョンアップする

% nodebrew install-binary v16.15.1
Fetching: https://nodejs.org/dist/v16.15.1/node-v16.15.1-darwin-x64.tar.gz
Warning: Failed to create the file                                             
Warning: /Users/username/.nodebrew/src/v16.15.1/node-v16.15.1-darwin-x64.tar.gz
Warning: : No such file or directory
curl: (23) Failure writing output to destination

ディレクトリ無しのエラーが発生。
何らかの原因でディレクトリを消してしまったのかと思いますので、新しくディレクトリを作成します。

% mkdir -p ~/.nodebrew/src

ディレクトリ作成後、再度インストールを実行

% nodebrew install-binary v16.15.1
Fetching: https://nodejs.org/dist/v16.15.1/node-v16.15.1-darwin-x64.tar.gz
######################################################################### 100.0%
Installed successfully

node.jsの推奨版のインストールが完了

使用設定

% nodebrew use v16.15.1
use v16.15.1

% nodebrew ls
v16.15.1

nodeのバージョンを確認

% node -v
v16.15.1

全ての設定が完了

参考サイト

Node.jsのバージョンアップ for Mac

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