Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When installing node@8 on Apple M series chips, Volta generates an invalid URL path #1860

Open
zhongduyiyu opened this issue Aug 19, 2024 · 3 comments

Comments

@zhongduyiyu
Copy link

volta pin node@8 --verbose
[verbose] Loaded custom hooks file: /Users/local-admin/.volta/hooks.json
[verbose] Using node.index hook to determine node index URL
[verbose] Found valid cache of Node version index
[verbose] Found [email protected] matching requirement '>=8.0.0 <9.0.0-0' from https://mirrors.dotsrc.org/nodejs/release/index.json
[verbose] Acquiring lock on Volta directory: /Users/local-admin/.volta/volta.lock
[verbose] Using node.distro hook to determine download URL
[verbose] Downloading [email protected] from https://mirrors.dotsrc.org/nodejs/release/v8.17.0/node-v8.17.0-darwin-arm64.tar.gz
[verbose] Unlocking Volta Directory
error: Could not download [email protected]
from https://mirrors.dotsrc.org/nodejs/release/v8.17.0/node-v8.17.0-darwin-arm64.tar.gz

I'd like to point out that earlier versions (<16)of Node.js actually don't include packages specifically for darwin-arm64 architecture.

@zhongduyiyu zhongduyiyu changed the title When installing node@8 on Apple M series chips, Volta generates an invalid path When installing node@8 on Apple M series chips, Volta generates an invalid URL path Aug 19, 2024
@zhongduyiyu
Copy link
Author

I resolved the issue by using a custom installation method. Below is the documentation of my successful upgrade, and I hope it can help you.
https://beaded-mandolin-12a.notion.site/EN-Volta-Custom-Node-js-Installation-Guide-5404997fbc554694b981fbbd4bdeac7d

@charlespierce
Copy link
Contributor

Hi @zhongduyiyu, thanks for the report! I suspect this is an issue with our somewhat haphazard hooks implementation—when we're not using hooks, we correctly fall back to the Intel version of Node for versions < 16. However, I bet we're unconditionally passing the actual architecture to the hook, rather than being smart about the version.

@pjking07
Copy link

I encountered this behavior for custom hooks in Windows Arm as well, and I'll note that Node provides Windows Arm installers for >=19. So, custom hooks will fail in the Windows Arm build of volta v2 for node versions <19.

Thanks for the above explanation @charlespierce 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants