volta icon indicating copy to clipboard operation
volta copied to clipboard

can't install node versions on m1

Open fredericrous opened this issue 2 years ago • 33 comments

I can't install other node like node@12, node@14 on macbook pro m1 12.3

"volta" "install" "node@14"
Volta v1.0.8

Could not unpack Node v14.19.3

Please ensure the correct version is specified.

Error cause: failed to unpack `/Users/fredericrous/.volta/tmp/.tmplkXqXu/node-v14.19.3-darwin-x64/lib/node_modules/npm/node_modules/lodash._createset/README.md`

Error cause: failed to unpack `/Users/fredericrous/.volta/tmp/.tmplkXqXu/node-v14.19.3-darwin-x64/lib/node_modules/npm/node_modules/lodash._createset/README.md`

Error cause: failed to unpack `node-v14.19.3-darwin-x64/lib/node_modules/npm/node_modules/lodash._createset/README.md` into `/Users/fredericrous/.volta/tmp/.tmplkXqXu/node-v14.19.3-darwin-x64/lib/node_modules/npm/node_modules/lodash._createset/README.md`

Error cause: Resource temporarily unavailable (os error 35)

if I ls .volta/tmp, the tmp folder is empty. I already tried to uninstall everything and then install node again (with homebrew). No change

fredericrous avatar Jun 23 '22 12:06 fredericrous

might be a duplicate of https://github.com/volta-cli/volta/issues/1137 <- there is a mention of a workaround there but I didn't understand how it works

fredericrous avatar Jun 23 '22 14:06 fredericrous

Hi @fredericrous, that's strange! I don't think it's related to #1137, which was about an internal proxy and not getting the M1-enabled versions. In your case, it looks like the tar archive for that specific version of Node is corrupted or somehow not unpacking correctly. Is this a consistent error every time you try to install that version of Node? Does it happen with other versions or only Node 14?

I ask about the consistency because the underlying OS error seems to be a temporarily unavailable, which makes me wonder if there was some hiccup in the filesystem.

charlespierce avatar Jun 23 '22 23:06 charlespierce

Yes it is consistent. It happens with every version I tried. The loader goes above 70%, stays there a bit, then Volta fails. Could it be possible that the download failed silently? I'm behind a corporate proxy. for almost everything I have to configure their self signed certificate

fredericrous avatar Jun 24 '22 06:06 fredericrous

Could the download have failed silently? I am behind a VPN. Would there be a place where I should configure self signed ssl certificates?

fredericrous avatar Jun 30 '22 10:06 fredericrous

I don't think the download would fail silently, however Volta does unpack as it downloads, so this error would essentially be connected to any download interruption.

If it's an SSL issue, the download is attempting to fetch the appropriate Node version directly from the NodeJS domain, e.g. https://nodejs.org/dist/v16.16.0/node-v16.16.0-linux-x64.tar.gz

If you manually download that file, does it work and can you correctly unpack it? If so, then there's something else odd going on with the network connection.

charlespierce avatar Jul 10 '22 00:07 charlespierce

sorry for bumping a stale issue, but this is happening on the github CI as well:

Please ensure the correct version is specified.
error: Error cause: failed to unpack `/opt/hostedtoolcache/volta/1.1.1/x64/tmp/.tmpHg9Rob/node-v18.14.0-linux-x64/bin/node`

Error cause: failed to unpack `/opt/hostedtoolcache/volta/1.1.1/x64/tmp/.tmpHg9Rob/node-v18.14.0-linux-x64/bin/node`

Error cause: failed to unpack `node-v18.14.0-linux-x64/bin/node` into `/opt/hostedtoolcache/volta/1.1.1/x64/tmp/.tmpHg9Rob/node-v18.14.0-linux-x64/bin/node`

Error cause: Resource temporarily unavailable (os error 11)
Error: The process '/opt/hostedtoolcache/volta/1.1.1/x64/bin/volta' failed with exit code 1

Sometimes it works fine, sometimes it just fails. It only fails sometimes, but it fails sometimes very consistently.

zaunermax avatar Feb 15 '23 10:02 zaunermax

This is happening for us as well.

smailc avatar Feb 24 '23 11:02 smailc

I think my issue is related to having a self signed certificate on my machine that the firewall uses to let me do requests to the outside world. (I'm no network guy)

Searching on the wide internet, I found this lib that I think would solve the issue if volta implements it https://github.com/rustls/rustls-native-certs

I could then configure variable SSL_CERT_FILE with the path to the self signed certificate of the company

PS: @charlespierce ofc I can download nodejs and unpack it if I use chrome. But chrome is configured with the certificates

fredericrous avatar Feb 24 '23 12:02 fredericrous

We are facing this issue in github CI as well.

Volta error: Could not unpack Node v18.14.2

Please ensure the correct version is specified.
Volta error: Error cause: failed to unpack `/opt/hostedtoolcache/volta/1.1.1/x64/tmp/.tmpextCZu/node-v18.14.2-linux-x64/bin/node`

Error cause: failed to unpack `/opt/hostedtoolcache/volta/1.1.1/x64/tmp/.tmpextCZu/node-v18.14.2-linux-x64/bin/node`

Error cause: failed to unpack `node-v18.14.2-linux-x64/bin/node` into `/opt/hostedtoolcache/volta/1.1.1/x64/tmp/.tmpextCZu/node-v18.14.2-linux-x64/bin/node`

Error cause: Resource temporarily unavailable (os error 11)

MarioMH8 avatar Mar 16 '23 12:03 MarioMH8

Having similar issues in Bitbucket Pipelines with several node versions, e.g.

error: Could not unpack Node v17.9.1
Please ensure the correct version is specified.
Error details written to /root/.volta/log/volta-error-2023-03-16_09_59_40.520.log
The command '/bin/bash -c volta install node@17' returned a non-zero code: 1

Sometimes it works, sometimes it does not. Happening with node versions 12-18.

bretonics avatar Mar 16 '23 13:03 bretonics

Same thing here. This seems to be happening intermittently over the past 3 days.

Step 11/37 : RUN curl https://get.volta.sh \| bash -s -- --version ${VOLTA_VERSION}
298 | ---> Running in a7881a6b92be
299 | % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
300 | Dload  Upload   Total   Spent    Left  Speed
301 |  
302 | 0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
303 | 100 10930  100 10930    0     0  58138      0 --:--:-- --:--:-- --:--:-- 58449
304 | Installing Volta version 1.1.0
305 | Checking for existing Volta installation
306 | Fetching archive for Linux, version 1.1.0
307 |  
308 | 0.1%
309 | ######################################################################## 100.0%
310 | Creating directory layout
311 | Extracting Volta binaries and launchers
312 | Finished installation. Updating user profile settings.
313 | Removing intermediate container a7881a6b92be
314 | ---> a1651b4ccb08
315 | Step 12/37 : RUN volta install node
316 | ---> Running in a16da739dfbf
317 | error: Could not unpack Node v18.15.0
318 |  
319 | Please ensure the correct version is specified.
320 | Error details written to /opt/volta/.volta/log/volta-error-2023-03-16_15_17_33.077.log
321 | The command '/bin/bash -c volta install node' returned a non-zero code: 1
322

When I retry the exact build, sometimes it works.

lasergoat avatar Mar 16 '23 15:03 lasergoat

having the same issues as @lasergoat - but only in github actions and aws codebuild. Not locally. I wonder if 1.1.1 fixes this? Or am i reading the thread wrong?

es50678 avatar Mar 17 '23 16:03 es50678

We experience this issue multiple times a day unfortunately, its probably added hours of delays to our CI pipeline daily

omairvaiyani avatar Mar 20 '23 10:03 omairvaiyani

I think the issue was with the Node distribution itself having problems the last couple days, this seems to be solved now though: https://github.com/nodejs/nodejs.org/issues/5149

We are having no more problems in our CI pipelines.

AbhiPrasad avatar Mar 20 '23 10:03 AbhiPrasad

Node.js here 👋 we apologise for the issues that affected your repository through our incident. For future incidents, please keep an 👀 on status.nodejs.org, Thanks!

ovflowd avatar Mar 20 '23 11:03 ovflowd

This started happening again since yesterday. First on node 16, then today 18.

Seems like it really isn't Volta related but rather Node.js then, @ovflowd ?

bretonics avatar Apr 14 '23 13:04 bretonics

I don't think we have any issues on our side :)

We do have occasional caching issues that might lead to some HTTP errors for a short period of time for a very few (random) amount of people. We are working on that, but I guess it's just the reality of our infra right now.

ovflowd avatar Apr 15 '23 07:04 ovflowd

We are seeing this as well, node 16 and circle ci 😞

maurolemos avatar Apr 18 '23 09:04 maurolemos

fwiw we ended up switching to the actions/setup-node to unflake our CI: https://github.com/getsentry/sentry-javascript/pull/7763

actions/setup-node reads your volta entry in your package.json.

AbhiPrasad avatar Apr 18 '23 09:04 AbhiPrasad

Thanks for the continued reports, folks!

@rwjblue we might want to (a) (soft-?)deprecate volta-cli/action in favor of actions/setup-node since it supports it now or see if there's a reason the setup-node action is more stable than ours.

chriskrycho avatar Apr 21 '23 22:04 chriskrycho

@chriskrycho actions/setup-node will only handle the node version, while volta-cli/action also handles the package manager, so would not be a direct replacement in some cases.

gremlin896 avatar Apr 24 '23 14:04 gremlin896

Screenshot 2023-05-09 at 16 40 29

alexandr2110pro avatar May 09 '23 12:05 alexandr2110pro

same here... NX cloud with Dte... node 16.13, angular 15

harellevy avatar May 16 '23 14:05 harellevy

I also saw this already multiple times. Nothing to add. Absolutely annoying :(

I also use NX and volta-cli/action is part of the pre-configured NX workflows...

gestj avatar Aug 25 '23 12:08 gestj

I also saw this already multiple times. Nothing to add. Absolutely annoying :(

I also use NX and volta-cli/action is part of the pre-configured NX workflows...

+1, volta fetch fails with following message:

"volta" "fetch" "node@14"
Volta v1.1.1

Could not unpack Node v14.21.3

Please ensure the correct version is specified.

Error cause: failed to unpack `~/.volta/tmp/.tmpgsgP5a/node-v14.21.3-darwin-x64/bin/node`

Error cause: failed to unpack `~/.volta/tmp/.tmpgsgP5a/node-v14.21.3-darwin-x64/bin/node`

Error cause: failed to unpack `node-v14.21.3-darwin-x64/bin/node` into `~/volta/tmp/.tmpgsgP5a/node-v14.21.3-darwin-x64/bin/node`

Error cause: Resource temporarily unavailable (os error 35)

shining-mind avatar Aug 25 '23 14:08 shining-mind

volta --verbose install node
[verbose] No custom hooks found
[verbose] Found valid cache of Node version index
[verbose] Found newest LTS node version (18.17.1) from https://nodejs.org/dist/index.json
[verbose] Acquiring lock on Volta directory: ~/.volta/volta.lock
[verbose] Downloading [email protected] from https://nodejs.org/dist/v18.17.1/node-v18.17.1-darwin-x64.tar.gz
[verbose] Unpacking node into '~/.volta/tmp/.tmpu1NqMB'
[verbose] Unlocking Volta Directory
error: Could not unpack Node v18.17.1

Please ensure the correct version is specified.
[verbose] Error cause: failed to unpack `~/.volta/tmp/.tmpu1NqMB/node-v18.17.1-darwin-x64/bin/node`

Error cause: failed to unpack `~/.volta/tmp/.tmpu1NqMB/node-v18.17.1-darwin-x64/bin/node`

Error cause: failed to unpack `node-v18.17.1-darwin-x64/bin/node` into `~/.volta/tmp/.tmpu1NqMB/node-v18.17.1-darwin-x64/bin/node`

Error cause: Resource temporarily unavailable (os error 35)
Error details written to ~/.volta/log/volta-error-2023-09-18_16_11_34.765.log

trydofor avatar Sep 18 '23 08:09 trydofor

Is there any update?

mberneti avatar Sep 19 '23 11:09 mberneti

@lasergoat and our teams are still having the same issue. It's very inconsistent but we think it occurs more around peak build times. Could this happen as part of some kind of rate limitting?

es50678 avatar Oct 12 '23 18:10 es50678

We got the same issue again today locally for the first time:

 ~/Code/fatt ························································································ base   sandboxAdmin us-west-2   11:05:33
❯ volta install node@21
error: Could not unpack Node v21.1.0

Please ensure the correct version is specified.
Error details written to /Users/eduardosoto/.volta/log/volta-error-2023-10-26_11_18_18.499.log

This seems to be happening more frequently so we have removed volta from our CI/CD pipelines.

es50678 avatar Oct 26 '23 15:10 es50678

As noted above, it is indeed almost certainly related to rate limiting. @rwjblue another option here might be to allow the Volta GH action to use a GitHub access token? That is the recommended strategy I've seen used for other things with this issue.

chriskrycho avatar Nov 29 '23 03:11 chriskrycho