asdf-nodejs icon indicating copy to clipboard operation
asdf-nodejs copied to clipboard

Unable to install node >= 18.12.0 versions

Open jtlimo opened this issue 1 year ago • 42 comments

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.

jtlimo avatar Mar 16 '23 15:03 jtlimo

We're seeing the same thing.

anthonator avatar Mar 16 '23 18:03 anthonator

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

augustobmoura avatar Mar 16 '23 18:03 augustobmoura

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

shadowspawn avatar Mar 16 '23 21:03 shadowspawn

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

augustobmoura avatar Mar 16 '23 21:03 augustobmoura

Seems to be working for me.

anthonator avatar Mar 17 '23 16:03 anthonator

I tried here and the problem continue

jtlimo avatar Mar 17 '23 17:03 jtlimo

Had trouble with this yesterday due to the 404s. appears to have resolved itself now. no need to use --compile anymore, i think

kalupa avatar Mar 17 '23 20:03 kalupa

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. 😢

jtlimo avatar Mar 20 '23 18:03 jtlimo

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

genu avatar Mar 21 '23 15:03 genu

What's going on?

johnbendi avatar Apr 14 '23 00:04 johnbendi

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

augustobmoura avatar Apr 14 '23 00:04 augustobmoura

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.

johnbendi avatar Apr 14 '23 00:04 johnbendi

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?

owpac avatar Apr 14 '23 10:04 owpac

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

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?

jtlimo avatar Apr 14 '23 12:04 jtlimo

@owpac, see https://github.com/asdf-vm/asdf-nodejs/issues/345

mrienstra avatar Apr 17 '23 18:04 mrienstra

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.

OvermindDL1 avatar May 05 '23 14:05 OvermindDL1

Removing aria2c from the PATH fixes it for some reason, so try that for anyone else having this issue.

OvermindDL1 avatar May 05 '23 14:05 OvermindDL1

@OvermindDL1, sounds like a new issue worth reporting! https://github.com/asdf-vm/asdf-nodejs/issues/new/choose

mrienstra avatar May 05 '23 16:05 mrienstra

@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

augustobmoura avatar May 20 '23 17:05 augustobmoura

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.

lxe avatar May 30 '23 04:05 lxe

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

M77ix avatar May 30 '23 17:05 M77ix

Update: I managed to fix the issue, for some reason anaconda was messing up the install and uninstalling it fixed the problem !

M77ix avatar May 31 '23 15:05 M77ix

Same here @lxe

W10 WSL2 Arch Linux

jvbs avatar Jun 01 '23 13:06 jvbs

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

zackerydev avatar Aug 24 '23 14:08 zackerydev

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.

jtlimo avatar Aug 24 '23 14:08 jtlimo

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

jtlimo avatar Aug 24 '23 14:08 jtlimo

issue is upstream: https://github.com/nodejs/nodejs.org/issues/5666

jdx avatar Aug 24 '23 15:08 jdx

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

augustobmoura avatar Aug 24 '23 15:08 augustobmoura

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 avatar Aug 24 '23 15:08 augustobmoura

@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

jdx avatar Aug 24 '23 15:08 jdx