asdf-nodejs
asdf-nodejs copied to clipboard
Unable to install node >= 18.12.0 versions
I'm using a MacOS M1 and trying to install the 18.12.0 version, but instead I receive an error message that suggests to use the flag --compile
; I tried using the flag, but the error continues.
Trying to update node-build... ok
Downloading node-v18.12.0-darwin-x64.tar.gz...
-> https://nodejs.org/dist/v18.12.0/node-v18.12.0-darwin-x64.tar.gz
error: failed to download node-v18.12.0-darwin-x64.tar.gz
-> https://nodejs.org/dist/v18.12.0/node-v18.12.0-darwin-x64.tar.gz
error: failed to download node-v18.12.0-darwin-x64.tar.gz
BUILD FAILED (OS X 13.2 using node-build 4.9.88-78-g8ead6fb3)
Binary installation failed; try compiling from source with `--compile` flag
Also, reading some issues I tried some commands, like:
arch -x86_64 zsh
and after that ran the installation unsuccessfully.
We're seeing the same thing.
Can you guys check if it is related to https://github.com/nodenv/node-build/issues/777?
I'm unable to test on an M1 MacOS. If someone is able to do some debugging please share on this post
There was a problem with intermittent 404s affecting downloads from nodejs, which is hopefully largely resolved:
- https://status.nodejs.org
- https://github.com/nodejs/nodejs.org/issues/5149
Thanks for the information, @shadowspawn! That could be it
But I find it strange that only Apple Silicon versions are being affected, and running asdf on Rosetta solves the issue. I will let the issue open while we don't confirm that the problem is purely on NodeJS servers.
@jtlimo @anthonator please try downloading that version later after NodeJS update its status as fixed, and confirm if that was the problem
Seems to be working for me.
I tried here and the problem continue
Had trouble with this yesterday due to the 404s. appears to have resolved itself now. no need to use --compile anymore, i think
Had trouble with this yesterday due to the 404s. appears to have resolved itself now. no need to use --compile anymore, i think
I tried again, and nothing changed. 😢
I'm seeing this as well, not sure if its related exactly, but I run these commands:
> asdf latest nodejs
> 19.8.1
> asdf install nodejs 19.18.1
> Trying to update node-build... ok
> node-build: definition not found: 19.18.1
What's going on?
I'm seeing this as well. Not sure if it is related exactly, but I run these commands:
> asdf latest nodejs > 19.8.1 > asdf install nodejs 19.18.1 > Trying to update node-build... ok > node-build: definition not found: 19.18.1
There is a typo on your installation command. The latest version is 19.8.1
, but you ran the command trying to install 19.18.1
. You can avoid re-typing the version number by running the command asdf install nodejs latest
.
Again, I cannot reproduce the issue on Linux. If someone else is having this problem on macOS, I would ask to debug it if possible or to provide more information on what could be happening.
@jtlimo, is the issue still happening? Did you try updating both asdf-code
and asdf-nodejs
? Try running this command to update all your plugins otherwise:
asdf update
asdf plugin update --all
My case was also related to https://github.com/asdf-vm/asdf-nodejs/issues/299 which was occuring after a recent update and somehow also giving me the node-build: definition not found:
message. Clearing the cache as suggested from there solved it for me.
Hello, in the same way, I can't install Nodejs v19.9.0. The latest version found by asdf is v19.8.1 🫠
I tried to erase my cache with rm -rf $ASDF_DIR/tmp/nodejs
but it didn't change anything. I also tried to update asdf & asdf plugin-update --all
but nothing either.
What's going on?
I'm seeing this as well. Not sure if it is related exactly, but I run these commands:
> asdf latest nodejs > 19.8.1 > asdf install nodejs 19.18.1 > Trying to update node-build... ok > node-build: definition not found: 19.18.1
There is a typo on your installation command. The latest version is
19.8.1
, but you ran the command trying to install19.18.1
. You can avoid re-typing the version number by running the commandasdf install nodejs latest
.Again, I cannot reproduce the issue on Linux. If someone else is having this problem on macOS, I would ask to debug it if possible or to provide more information on what could be happening.
@jtlimo, is the issue still happening? Did you try updating both
asdf-code
andasdf-nodejs
? Try running this command to update all your plugins otherwise:asdf update asdf plugin update --all
Hi, the issue is still happening. I'll try these commands and comeback here;
Tried the commands, and the issue is still happening 😢
Also, how to debug to help with more informations?
@owpac, see https://github.com/asdf-vm/asdf-nodejs/issues/345
Same issue for me on linux as well:
❯ asdf install nodejs 20.1.0
Trying to update node-build... ok
Downloading node-v20.1.0-linux-x64.tar.gz...
-> https://nodejs.org/dist/v20.1.0/node-v20.1.0-linux-x64.tar.gz
error: failed to download node-v20.1.0-linux-x64.tar.gz
-> https://nodejs.org/dist/v20.1.0/node-v20.1.0-linux-x64.tar.gz
error: failed to download node-v20.1.0-linux-x64.tar.gz
BUILD FAILED (Ubuntu 22.04 using node-build 4.9.115)
Binary installation failed; try compiling from source with `--compile` flag
❯ asdf install nodejs 20.1.0 --compile
Trying to update node-build... ok
Downloading node-v20.1.0-linux-x64.tar.gz...
-> https://nodejs.org/dist/v20.1.0/node-v20.1.0-linux-x64.tar.gz
error: failed to download node-v20.1.0-linux-x64.tar.gz
-> https://nodejs.org/dist/v20.1.0/node-v20.1.0-linux-x64.tar.gz
error: failed to download node-v20.1.0-linux-x64.tar.gz
BUILD FAILED (Ubuntu 22.04 using node-build 4.9.115)
Binary installation failed; try compiling from source with `--compile` flag
Tried all the 19's and 20's that are available in list-all, same results.
I do have aria2c, manually downloading the above url's via aria2c and curl both works fine.
Removing aria2c from the PATH fixes it for some reason, so try that for anyone else having this issue.
@OvermindDL1, sounds like a new issue worth reporting! https://github.com/asdf-vm/asdf-nodejs/issues/new/choose
@jtlimo can you check if removing aria2c
from path solves the issue? It looks like the project is not being maintained for some time and it does have some unsolved issues on MacOS and DNS. I will try pushing a PR to node-build so it can stop using it as the default downloader
Same issue here on Windows 11 Ubuntu WSL:
$ asdf install nodejs lts
Cloning node-build...
node-build: definition not found: 18
20.2.0 installs fine.
I'm also having the issue where i cant download Nodejs, I get the error message: error: failed to download node v18.16.0-darwin-x64.tar.gz BUILD FAILED (OS X 13.3.1 using node-build 4.9.115-3-gf32092ec)
. I tried everything mentioned here and more and can't seem to resolve the issue I had previously installed some NodeJS version without issue but now I cant download any of them, I get the same error message each time! I'm on Mac with an Intel chip
Update: I managed to fix the issue, for some reason anaconda was messing up the install and uninstalling it fixed the problem !
Same here @lxe
W10 WSL2 Arch Linux
I was having this issue - thought it might be aria2c
but wasn't able to find that installed anywhere.
If you land here it could be because of IPv6, the network I was on didn't support it so I had to do:
NODE_BUILD_CURL_OPTS=--ipv4 asdf install nodejs 20.5.0
I was having this issue - thought it might be
aria2c
but wasn't able to find that installed anywhere.If you land here it could be because of IPv6, the network I was on didn't support it so I had to do:
NODE_BUILD_CURL_OPTS=--ipv4 asdf install nodejs 20.5.0
I tried with NODE_BUILD_CURL_OPTS=--ipv4 asdf install nodejs 20.5.0 but I have the same error.
Seeing #363 and tried some commands from there and nothing changes.
One thing different it's when I running this:
ASDF_NODEJS_VERBOSE_INSTALL=true asdf install nodejs
results:
Trying to update node-build... ok
/var/folders/_6/34r_v3ps59s7gmtrczrkw_s40000gq/T/node-build.20230824115414.32255.PDnmth ~
Downloading node-v16.0.0-darwin-arm64.tar.gz...
-> https://nodejs.org/dist/v16.0.0/node-v16.0.0-darwin-arm64.tar.gz
curl: (60) SSL certificate problem: self-signed certificate in certificate chain
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
error: failed to download node-v16.0.0-darwin-arm64.tar.gz
-> https://nodejs.org/dist/v16.0.0/node-v16.0.0-darwin-arm64.tar.gz
curl: (60) SSL certificate problem: self-signed certificate in certificate chain
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
error: failed to download node-v16.0.0-darwin-arm64.tar.gz
BUILD FAILED (OS X 13.2 using node-build 4.9.120)
Binary installation failed; try compiling from source with `--compile` flag
issue is upstream: https://github.com/nodejs/nodejs.org/issues/5666
Seeing #363 and tried some commands from there and nothing changes.
One thing different it's when I running this:
ASDF_NODEJS_VERBOSE_INSTALL=true asdf install nodejs
What happens if you try downloading the file manually from a browser? For the URL: https://nodejs.org/dist/v16.0.0/node-v16.0.0-darwin-arm64.tar.gz
Try also downloading from curl directly from your terminal:
curl -O https://nodejs.org/dist/v16.0.0/node-v16.0.0-darwin-arm64.tar.gz
Also, @jtlimo, are you using any kind of VPN? Even Apple's Private Relay could interfere Can you also try running the same command from on a different network? Maybe from mobile data, or try to use a different VPN if you have access to one
@augustobmoura see https://github.com/nodejs/nodejs.org/issues/5666. nodejs.org is having issues that I'm guessing may be related to this: https://github.com/nodejs/build/issues/3469