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

ERROR: --noenable_bzlmod :: Unrecognized option: --noenable_bzlmod #1221

Open
Lingbo-Huang opened this issue Dec 13, 2023 · 2 comments
Open

Comments

@Lingbo-Huang
Copy link

~/buildtools$ bazel build //buildifier //buildozer //unused_deps
INFO: Reading rc options for 'build' from /home/hlb/buildtools/.bazelrc:
Inherited 'common' options: --noenable_bzlmod
ERROR: --noenable_bzlmod :: Unrecognized option: --noenable_bzlmod
If I comment # common --noenable_bzlmod, then:
~/buildtools$ bazel build //buildifier //buildozer //unused_deps
ERROR: /home/hlb/.cache/bazel/_bazel_hlb/5a84903b8aa4b1e2fce09ccd833212fb/external/io_bazel_rules_go/go/private/sdk.bzl:563:12: name 'json' is not defined
ERROR: error loading package '': in /home/hlb/.cache/bazel/_bazel_hlb/5a84903b8aa4b1e2fce09ccd833212fb/external/io_bazel_rules_go/go/deps.bzl: Extension 'go/private/sdk.bzl' has errors
INFO: Elapsed time: 0.043s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

@ssssaf
Copy link

ssssaf commented Mar 30, 2024

I had the same problem, have you solved it yet?

~/buildtools$ bazel build //buildifier //buildozer //unused_deps INFO: Reading rc options for 'build' from /home/hlb/buildtools/.bazelrc: Inherited 'common' options: --noenable_bzlmod ERROR: --noenable_bzlmod :: Unrecognized option: --noenable_bzlmod If I comment # common --noenable_bzlmod, then: ~/buildtools$ bazel build //buildifier //buildozer //unused_deps ERROR: /home/hlb/.cache/bazel/_bazel_hlb/5a84903b8aa4b1e2fce09ccd833212fb/external/io_bazel_rules_go/go/private/sdk.bzl:563:12: name 'json' is not defined ERROR: error loading package '': in /home/hlb/.cache/bazel/_bazel_hlb/5a84903b8aa4b1e2fce09ccd833212fb/external/io_bazel_rules_go/go/deps.bzl: Extension 'go/private/sdk.bzl' has errors INFO: Elapsed time: 0.043s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded)

@huidong-chen
Copy link

huidong-chen commented May 10, 2024

Same problem

$ bazel build :protoc :protobuf
Starting local Bazel server and connecting to it...
INFO: Reading rc options for 'build' from /home/huidongc/github/protobuf/.bazelrc:
  Inherited 'common' options: --noenable_bzlmod --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1
ERROR: --noenable_bzlmod :: Unrecognized option: --noenable_bzlmod

After upgrading Bazel, the issue is gone.

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