🌹
nodenvのinstallで失敗した時はRosettaでインストールしてみる
nodenv
でサポートがすでに切れているバージョンをインストールする際にエラーが起きた。
❯ nodenv install 14.18.3
To follow progress, use 'tail -f /var/folders/dv/p72yf1l9319b1jdtxmsp20wh0000gn/T/node-build.20240619231901.21588.log' or pass --verbose
Downloading node-v14.18.3.tar.gz...
-> https://nodejs.org/dist/v14.18.3/node-v14.18.3.tar.gz
WARNING: node-v14.18.3 is past its end of life and is now unsupported.
It no longer receives bug fixes or security updates.
Installing node-v14.18.3...
BUILD FAILED (macOS 14.4 using node-build 5.3.0)
Inspect or clean up the working tree at /var/folders/dv/p72yf1l9319b1jdtxmsp20wh0000gn/T/node-build.20240619231901.21588.5Tterf
Results logged to /var/folders/dv/p72yf1l9319b1jdtxmsp20wh0000gn/T/node-build.20240619231901.21588.log
Last 10 log lines:
../deps/v8/src/base/bit-field.h:43:29: error: integer value 7 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
../deps/v8/src/base/bit-field.h:43:29: error: integer value 7 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
2 errors generated.
make[1]: *** [/private/var/folders/dv/p72yf1l9319b1jdtxmsp20wh0000gn/T/node-build.20240619231901.21588.5Tterf/node-v14.18.3/out/Release/obj.target/v8_compiler/deps/v8/src/compiler/access-builder.o] Error 1
2 errors generated.
make[1]: *** [/private/var/folders/dv/p72yf1l9319b1jdtxmsp20wh0000gn/T/node-build.20240619231901.21588.5Tterf/node-v14.18.3/out/Release/obj.target/v8_compiler/deps/v8/src/compiler/access-info.o] Error 1
4 errors generated.
make[1]: *** [/private/var/folders/dv/p72yf1l9319b1jdtxmsp20wh0000gn/T/node-build.20240619231901.21588.5Tterf/node-v14.18.3/out/Release/obj.target/v8_compiler/deps/v8/src/compiler/backend/code-generator.o] Error 1
rm 73d02efeb2741faeefe84d2e1362a8222785a459.intermediate d47d240248bcbd4d11f6d572536987de87553eb9.intermediate f96be30f3b1fe4fdb1930590db00d407c3e1b270.intermediate
make: *** [node] Error 2
以下のコマンドでインストールするとRosetta経由で-x86_64
のIntelのアーキテクチャとしてインストールできるようになる。
❯ arch -x86_64 nodenv install 14.18.3
To follow progress, use 'tail -f /var/folders/dv/p72yf1l9319b1jdtxmsp20wh0000gn/T/node-build.20240619232401.36915.log' or pass --verbose
Downloading node-v14.18.3-darwin-x64.tar.gz...
-> https://nodejs.org/dist/v14.18.3/node-v14.18.3-darwin-x64.tar.gz
WARNING: node-v14.18.3-darwin-x64 is past its end of life and is now unsupported.
It no longer receives bug fixes or security updates.
Installing node-v14.18.3-darwin-x64...
Installed node-v14.18.3-darwin-x64 to /Users/yusuke/.nodenv/versions/14.18.3
Discussion