NVM не может установить нужную версию NodeJS

В MacOS обнаружил, что Node Version Manager не может поставить нужную мне версию NodeJS. Как это было.

Ставлю NVM:

brew install nvm

И пытаюсь поставить ноду:

nvm install 12.16.1

Она начинает устанавливаться и падает с такой ошибкой:

 nvm install 12.16.1
Downloading and installing node v12.16.1...
Downloading https://nodejs.org/dist/v12.16.1/node-v12.16.1-darwin-arm64.tar.xz...

curl: (22) The requested URL returned error: 404
Binary download from https://nodejs.org/dist/v12.16.1/node-v12.16.1-darwin-arm64.tar.xz failed, trying source.
grep: /Users/silver/.nvm/.cache/bin/node-v12.16.1-darwin-arm64/node-v12.16.1-darwin-arm64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Clang v3.5+ detected! CC or CXX not specified, will use Clang as C/C++ compiler!
Local cache found: ${NVM_DIR}/.cache/src/node-v12.16.1/node-v12.16.1.tar.xz
Checksums match! Using existing downloaded archive ${NVM_DIR}/.cache/src/node-v12.16.1/node-v12.16.1.tar.xz
$>./configure --prefix=/Users/silver/.nvm/versions/node/v12.16.1 <
INFO: Using floating patch "tools/icu/patches/64/source/common/putil.cpp" from "tools/icu"
INFO: Using floating patch "tools/icu/patches/64/source/i18n/dtptngen.cpp" from "tools/icu"
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
Error running GYP
nvm: install v12.16.1 failed!

Т.е. не видит Command Line Tools для Xсode. Хотя они установлены и все было хорошо до этого. Решение проблемы банально - переустановить CLT:

xcode-select --print-path
sudo rm -rf $(xcode-select --print-path)
xcode-select --install

После этого у меня все завелось и полетело.

Поделиться: DiasporaTwitterFacebookLinkedInHackerNewsEmailReddit

Похожие записи:



Комментарии: