アンインストールから再インストールすることにした
個人的なメモなので自己責任でお願いしま🐱
もくじ
アンインストール
$ npm uninstall -g npm removed 430 packages in 6.19s
$ brew uninstall node
$ brew uninstall nodebrew
$ curl -o uninstall-node.sh https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh $ chmod u+x uninstall-node.sh $ ./uninstall-node.sh 空Enter $ rm uninstall-node.sh
$ sudo rm -rf /usr/local/include/node $ sudo rm -rf /usr/local/lib/dtrace $ rm -rf ~/.node-gyp $ rm -rf ~/.npm $ rm -rf ~/.sourcemint
$ which node /Users/yuu3/.nodebrew/current/bin/node $ rm -rf /Users/kanehiroyuu/.nodebrew/current/bin/node
$ brew cleanup
インストール
$ curl -L git.io/nodebrew | perl - setup
$ export PATH=$HOME/.nodebrew/current/bin:$PATH
$ nodebrew install-binary latest
src $ nodebrew ls v8.1.3 v8.12.0 v8.13.0 v10.0.0 v10.10.0 v12.11.1 v12.14.1 v15.7.0 current: v12.14.1
$ nodebrew use v12.14.1 use v12.14.1
$ nodebrew setup Fetching nodebrew... Installed nodebrew in $HOME/.nodebrew ======================================== Export a path to nodebrew: export PATH=$HOME/.nodebrew/current/bin:$PATH ========================================
$ brew update Error: homebrew-core is a shallow clone. To `brew update`, first run: git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow This restriction has been made on GitHub's request because updating shallow clones is an extremely expensive operation due to the tree layout and traffic of Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you automatically to avoid repeatedly performing an expensive unshallow operation in CI systems (which should instead be fixed to not use shallow clones). Sorry for the inconvenience!
WebToolKit $ git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
$ brew update
WebToolKit $ nodebrew uninstall v12.14.1 v12.14.1 uninstalled
WebToolKit $ nodebrew install-binary v12.14.1
$ nodebrew ls v8.1.3 v8.12.0 v8.13.0 v10.0.0 v10.10.0 v12.11.1 v12.14.1 v15.7.0 current: none
$ nodebrew use v12.14.1 use v12.14.1
$ node -v v12.14.1
“Mac node nodebrew再インストール”への1件のコメント