Cannot install latest lts node@20.12.0
jlarmstrongiv opened this issue · 3 comments
jlarmstrongiv commented
BUILD FAILED (OS X 14.3.1 using node-build 4.9.99-174-g9122e14b)
Binary installation failed; try compiling from source with `--compile` flag
Inspect or clean up the working tree at /var/folders/zf/2l3hc6vn12v7r89t45mhxzhm0000gn/T/node-build.20240329024320.31743.2hX97b
Results logged to /var/folders/zf/2l3hc6vn12v7r89t45mhxzhm0000gn/T/node-build.20240329024320.31743.log
Last 10 log lines:
Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
e5f607|OK | 44MiB/s|/private/var/folders/zf/2l3hc6vn12v7r89t45mhxzhm0000gn/T/node-build.20240329024320.31743.2hX97b/node-v20.12.0-darwin-x64.tar.gz
Status Legend:
(OK):download completed.
No version is set for command shasum
Consider adding one of the following versions in your config file at
perl 5.32.1
It seems the main issue is No version is set for command shasum
Occurs on both x86_64 and arm64 macOS Sonoma
jlarmstrongiv commented
More info on the error, which persists in 20.12.1
. It seems you can install any version so long as you are not in a folder with a .tool-versions
file. In that case, it will only print a warning.
asdf install nodejs 20.12.1
Trying to update node-build... ok
No version is set for command shasum
Consider adding one of the following versions in your config file at /Users/user/.tool-versions
perl 5.32.1
Downloading node-v20.12.1-darwin-arm64.tar.gz...
-> https://nodejs.org/dist/v20.12.1/node-v20.12.1-darwin-arm64.tar.gz
Installing node-v20.12.1-darwin-arm64...
Installed node-v20.12.1-darwin-arm64 to /Users/user/.asdf/installs/nodejs/20.12.1
asdf: Warn: You have configured asdf to preserve downloaded files (with always_keep_download=yes or --keep-download). But
asdf: Warn: the current plugin (nodejs) does not support that. Downloaded files will not be preserved.
thierrymarianne commented
Hey!
I confirm that #388 (comment) is a working workaround.
# remove .tool-versions file when it exists as a regular file
# (tested with darwin, zsh).
# it may work with linux distros, bash.
test -e .tool-versions && rm .tool-versions || true
asdf install nodejs 20.12.1
# to restore .tool-versions file
echo 'nodejs 20.12.1' > .tool-versions
augustobmoura commented
This is because your shasum
command is coming from another asdf plugin. From the logs it looks like they are comming from asdf-perl
. Either set a global version for asdf-perl
or make sure the shasum
system binary is being used before running asdf install
Edit: Relevant log lines:
No version is set for command shasum
Consider adding one of the following versions in your config file at /Users/user/.tool-versions
perl 5.32.1