-
Notifications
You must be signed in to change notification settings - Fork 212
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
Macbook Pro M1 Error: "Failed to setup node binary." #182
Comments
Node.js does not yet publish builds for the Apple M1 (arm64), and when they do it will be for node v15 or later. It's possible to build binaries from source, but For now, the x64 binaries should work fine via Rosetta 2, though with non-optimal performance. Try this:
Once you use It could be possible to update |
See also nodejs/build#2474 |
Do you think this will lead to worse download sizes? |
Based on the discussion in that issue about using fat binaries for the Mac OS builds starting in v16, yes I would expect the download on Mac OS to be larger then. But meanwhile, If anyone has an M1 Mac available to develop and test that fix on, a PR would be welcome! |
based on issue jasongin#182, tested and it works.
based on issue #182, tested and it works.
Fixed by 22fe78a |
From Node.js v16 there are separate downloads available for x64 and arm64 on Darwin. Inspecting the node binary with https://nodejs.org/dist/latest-v16.x/ By contrast, based on the file size and online comments during the development of the Apple silicon native support, I think the |
The change above was to fix the boostrap node binary download, which is not on v16 yet (and will not be for a while). Separately from that, using |
Sorry, I missed the distinction between the bootstrap download and the user requested download. Thanks for clarifying. (I don't have an Apple silicon Mac.) |
For info: I hit a similar issue on a brand new machine (running macOS Monterey):
I confirmed the node binary was x86_64, but I wasn't (yet) able to run any x86_64 executable: arch -x86_64 zsh
arch: posix_spawnp: zsh: Bad CPU type in executable It turns out Rosetta 2 wasn't installed. With GUI applications macOS would automatically detect this situation and prompt you to install it, but as I was installing things via CLI I didn't get any hints about this. Resolution: explicitly install Rosetta via cli: softwareupdate --install-rosetta After installing Rosetta |
Install nvs in M1 success, but it dosn't work.
run any nvs command, throw the errorMessage as below:
MacBook-Pro ~ % nvs -v
Downloading bootstrap node from https://nodejs.org/dist/v12.18.4/node-v12.18.4-darwin-arm64.tar.xz
-#O#- # #
Failed to setup node binary.
MacBook-Pro ~ %
The text was updated successfully, but these errors were encountered: