homebrew経由でnodebrewをインストールしていて、久しぶりにnodeのバージョンを変更しようとした時にエラーになったための備忘録(すぐ忘れる)
最新の安定板を入れる時にエラーになる
$ nodebrew install-binary stable
v12.6.0 is not found
Can not fetch: https://nodejs.org/dist/v12.6.0/node-v12.6.0-darwin-x64.tar.gz
単純にnodebrewのアップデートを行えば問題ないが、homebrew経由でインストールしている場合は
$ brew upgrade nodebrew
==> Upgrading 1 outdated package:
nodebrew 0.9.6 -> 1.0.1
==> Upgrading nodebrew
==> Downloading https://github.com/hokaccha/nodebrew/archive/v1.0.1.tar.gz
==> Downloading from https://codeload.github.com/hokaccha/nodebrew/tar.gz/v1.0.1
######################################################################## 100.0%
==> Caveats
You need to manually run setup_dirs to create directories required by nodebrew:
/usr/local/opt/nodebrew/bin/nodebrew setup_dirs
Add path:
export PATH=$HOME/.nodebrew/current/bin:$PATH
To use Homebrew's directories rather than ~/.nodebrew add to your profile:
export NODEBREW_ROOT=/usr/local/var/nodebrew
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completions have been installed to:
/usr/local/share/zsh/site-functions
==> Summary
🍺 /usr/local/Cellar/nodebrew/1.0.1: 8 files, 38.6KB, built in 18 seconds
Removing: /usr/local/Cellar/nodebrew/0.9.6... (8 files, 37.9KB)
これでアップデート完了
続けて最新の安定板をインストール
$ nodebrew install-binary stable
Fetching: https://nodejs.org/dist/v12.6.0/node-v12.6.0-darwin-x64.tar.gz
######################################################################## 100.0%
Installed successfully
普段から頻繁にアップデートする人には当たり前かもしれませんが、nodeのバージョン頻繁に切り替えたりhomebrewのアップデート全然していないので(homebrewの意味)
ただの備忘録です、、、(