-
Notifications
You must be signed in to change notification settings - Fork 524
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
Error while resolving toolchains for target in @npm//@bazel/labs/grpc_web on M1 Mac (arm64) #2733
Comments
Hmm, I don't have a way to test this (can't Apple ship one of these things to all OSS maintainers when they make such a big change?) Can you tell if this is specific to the labs package, or affects everything in rules_nodejs? Are you able to build anything that depends on a nodejs tool (say a |
I wrote a basic hello world typescript program and tried building it with
|
Happy to try any patches (that add more diagnostic info) to help speed up debugging. |
Seems like the mistake would have to be around here What's the output from running uname -m ? |
|
Hi @alexeagle, since this #2754 PR was merged, suppose it should be fine, but another error appeared on rules_nodejs v3.6.0 😓 Affected Rule: yarn_install (16:07:44) ERROR: An error occurred during the fetch of repository 'npm':
Traceback (most recent call last):
File "/private/var/tmp/_bazel_s12228/8853970899baaeb63ca98792c8fae39a/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 684, column 37, in _yarn_install_impl
_add_node_repositories_info_deps(repository_ctx)
File "/private/var/tmp/_bazel_s12228/8853970899baaeb63ca98792c8fae39a/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 433, column 27, in _add_node_repositories_info_deps
repository_ctx.symlink(
Error in symlink: Not a regular file: /private/var/tmp/_bazel_s12228/8853970899baaeb63ca98792c8fae39a/external/nodejs_darwin_arm64/node_info
(16:07:44) ERROR: Error fetching repository: Traceback (most recent call last):
File "/private/var/tmp/_bazel_s12228/8853970899baaeb63ca98792c8fae39a/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 684, column 37, in _yarn_install_impl
_add_node_repositories_info_deps(repository_ctx)
File "/private/var/tmp/_bazel_s12228/8853970899baaeb63ca98792c8fae39a/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 433, column 27, in _add_node_repositories_info_deps
repository_ctx.symlink(
Error in symlink: Not a regular file: /private/var/tmp/_bazel_s12228/8853970899baaeb63ca98792c8fae39a/external/nodejs_darwin_arm64/node_info
(16:07:44) ERROR: no such package '@npm//@bazel/labs': Not a regular file: /private/var/tmp/_bazel_s12228/8853970899baaeb63ca98792c8fae39a/external/nodejs_darwin_arm64/node_info Do we have any plan to support M1 Mac in the near future? 👀 |
So, this does work now, if you specify a new enough Node version.
I managed to get this error to print once, which is how I figured this issue out. But that error doesn't print in most cases, causing much confusion. |
I still see errors after adopting this solution for my mac with m1:
|
|
Given the labs package no longer exists, and the linked fix in #3339 is merged, I think this can be closed. |
Life saver. I have been trying to migrate a node lambda that was originally created on an intel mac. Have run into several problems including this one. Your comment solved my issue. thanks |
- Removes deprecated managed_directories, see bazelbuild/bazel#15463 - Fixes issue with @build_bazel_rules_nodejs, see bazel-contrib/rules_nodejs#2733 (comment) - Sets test action to use Ubuntu-20.04 because it's needed for pkg_tar (bazelbuild/bazel#11554) since python2 was removed from Ubuntu after 20.04.
## [1.22.1](v1.22.0...v1.22.1) (2023-01-11) ### Bug Fixes * Fixes various deprecations in test action ([#425](#425)) ([1efae2f](1efae2f)), closes [/github.com/bazel-contrib/rules_nodejs/issues/2733#issuecomment-903111659](https://github.com//github.com/bazelbuild/rules_nodejs/issues/2733/issues/issuecomment-903111659) * sets release action to use ubuntu-20.04 ([4dc4034](4dc4034)) * sets semantic release version to 19 in release action ([f6ac071](f6ac071))
- Removes deprecated managed_directories, see bazelbuild/bazel#15463 - Fixes issue with @build_bazel_rules_nodejs, see bazel-contrib/rules_nodejs#2733 (comment) - Sets test action to use Ubuntu-20.04 because it's needed for pkg_tar (bazelbuild/bazel#11554) since python2 was removed from Ubuntu after 20.04.
## [1.22.1](v1.22.0...v1.22.1) (2023-01-11) ### Bug Fixes * Fixes various deprecations in test action ([#425](#425)) ([1efae2f](1efae2f)), closes [/github.com/bazel-contrib/rules_nodejs/issues/2733#issuecomment-903111659](https://github.com//github.com/bazelbuild/rules_nodejs/issues/2733/issues/issuecomment-903111659) * sets release action to use ubuntu-20.04 ([4dc4034](4dc4034)) * sets semantic release version to 19 in release action ([f6ac071](f6ac071))
- Removes deprecated managed_directories, see bazelbuild/bazel#15463 - Fixes issue with @build_bazel_rules_nodejs, see bazel-contrib/rules_nodejs#2733 (comment) - Sets test action to use Ubuntu-20.04 because it's needed for pkg_tar (bazelbuild/bazel#11554) since python2 was removed from Ubuntu after 20.04.
## [1.22.1](v1.22.0...v1.22.1) (2023-01-11) ### Bug Fixes * Fixes various deprecations in test action ([#425](#425)) ([1efae2f](1efae2f)), closes [/github.com/bazel-contrib/rules_nodejs/issues/2733#issuecomment-903111659](https://github.com//github.com/bazelbuild/rules_nodejs/issues/2733/issues/issuecomment-903111659) * sets release action to use ubuntu-20.04 ([4dc4034](4dc4034)) * sets semantic release version to 19 in release action ([f6ac071](f6ac071))
- Removes deprecated managed_directories, see bazelbuild/bazel#15463 - Fixes issue with @build_bazel_rules_nodejs, see bazel-contrib/rules_nodejs#2733 (comment) - Sets test action to use Ubuntu-20.04 because it's needed for pkg_tar (bazelbuild/bazel#11554) since python2 was removed from Ubuntu after 20.04.
## [1.22.1](v1.22.0...v1.22.1) (2023-01-11) ### Bug Fixes * Fixes various deprecations in test action ([#425](#425)) ([1efae2f](1efae2f)), closes [/github.com/bazel-contrib/rules_nodejs/issues/2733#issuecomment-903111659](https://github.com//github.com/bazelbuild/rules_nodejs/issues/2733/issues/issuecomment-903111659) * sets release action to use ubuntu-20.04 ([4dc4034](4dc4034)) * sets semantic release version to 19 in release action ([f6ac071](f6ac071))
Affected Rule
ts_proto_library()
Is this a regression?
This works on a x86_64 mac, but not on an M1 mac.
Description
Generating typescript/javascript files for protobufs on an arm64 M1 mac fails.
🔬 Minimal Reproduction
Single proto file that used to work on an intel mac but doesn't work on an M1 mac: https://github.com/vinayreddy/experimental/tree/master/proto
🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_nodejs version:
My package.json is as follows:
When I build I see references to amd64 on the command-line from npm, and I suspect this is what is causing the problem. I'm unsure how to make npm use an arm64 version instead.
The text was updated successfully, but these errors were encountered: