Skip to content

Get node binary via @nodejs//:node - #1151

Closed
jfirebaugh wants to merge 2 commits into
emscripten-core:mainfrom
figma:jfirebaugh/node_bin
Closed

jfirebaugh wants to merge 2 commits into
emscripten-core:mainfrom
figma:jfirebaugh/node_bin

Conversation

@jfirebaugh

Copy link
Copy Markdown
Contributor

I had a colleague using an arm64 mac whose builds were failing because platform.machine() was returning amd64 for some reason (my guess is the python toolchain was running under Rosetta). Then emscripten_config looked for the node binary in a nonexistent directory -- nodejs_darwin_amd64 rather than nodejs_darwin_arm64.

This switches to a public rules_nodejs API for obtaining the binary, so should always work.

I had a colleague using an arm64 mac whose builds were failing because `platform.machine()` was returning amd64 for some reason (my guess is the python toolchain was running under Rosetta). Then emscripten_config looked for the node binary in a nonexistent directory -- nodejs_darwin_amd64 rather than nodejs_darwin_arm64.

This switches to a public rules_nodejs API for obtaining the binary, so should always work.
@walkingeyerobot
walkingeyerobot enabled auto-merge (squash) December 17, 2022 02:41
auto-merge was automatically disabled December 20, 2022 02:19

Head branch was pushed to by a user without write access

@jfirebaugh

Copy link
Copy Markdown
Contributor Author

I had to make two changes to get test-bazel-windows to pass:

  • Use @nodejs//:node_bin on Windows rather than @nodejs//:node. I don't know why this is necessary but it mirrors the previous logic in emscripten_config. @nodejs//:node_bin is the .../bin/nodejs/node.exe path.
  • Pin Bazel to 5.4.0, which seems to be the version that was tested prior to the 6.0.0 release today. This is a workaround for Error with Bazel 6 on Windows #1153.

@jfirebaugh

Copy link
Copy Markdown
Contributor Author

An equivalent change was merged as #1518.

@jfirebaugh jfirebaugh closed this Mar 21, 2025
@jfirebaugh
jfirebaugh deleted the jfirebaugh/node_bin branch March 21, 2025 21:17
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

Successfully merging this pull request may close these issues.

2 participants