-
Notifications
You must be signed in to change notification settings - Fork 255
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
[M1] Architecture (ARM -> X64) fallback issue #1137
Comments
Thanks for reporting @stefanpenner! I think I see the issue: Our hooks resolution uses the architecture of the system irrespective of the version, while our non-hook lookup is smart enough to detect that for versions of Node < 16, there is no ARM version and automatically fallback. We'll need to update the hooks resolution to take the architecture as a parameter, rather than relying on the constant, since the hooks are tool- and version-agnostic. |
arch -x86_64 $SHELL This doesn't seem to work, volta doesn't seem to inherit the shells architecture |
@charlespierce thanks for responding so quickly! That sounds like it could be it! |
@charlespierce is there a way that comes to mind, where I can force the architecture volta pulls? |
Unfortunately, the constants are hard-coded at compile time, so I don't believe there's a way at the moment to force the hook resolution to change. Depending on how big of a blocker this is, I can see a couple of possible workarounds:
|
|
For (1), you can download the x86_64 binaries from the You should then be able to drop those binaries in as replacements for the ARM ones directly (either in |
@charlespierce thanks, I can confirm that worked around the blocking issue, keeping folks on m1 macs using Rosetta 2. |
Using the latest version of volta:
With a package.json that specifies
node 14.x
(with custom npm registry in.npmrc
)On an m1 mac, in a non-rosetta context:
Running
node
attempts to download the arm64 binary (from our internalAs you can see, we have a private registry which could be the issue. When I attempt to run
node
without the private registry the x64 variant installs correctly:$ node -e "console.log(process.arch)" x64 $ node -v v14.17.5
Our `.volta/hooks.json`:
The text was updated successfully, but these errors were encountered: