Skip to content
This repository was archived by the owner on Feb 13, 2026. It is now read-only.
This repository was archived by the owner on Feb 13, 2026. It is now read-only.

Error in running bazel run //:gazelle-update-repos && bazel run //:gazelle #9

Description

@AnupKumarPanwar

I'm getting error after running this command.
bazel run //:gazelle-update-repos && bazel run //:gazelle

Output:

ERROR: /home/ubuntu/.cache/bazel/_bazel_ubuntu/4d8539e13e037cd09a1afca9813cd5e3/external/bazel_gazelle_go_repository_config/BUILD.bazel: no such target '@@bazel_gazelle_go_repository_config//:WORKSPACE': target 'WORKSPACE' not declared in package '' defined by /home/ubuntu/.cache/bazel/_bazel_ubuntu/4d8539e13e037cd09a1afca9813cd5e3/external/bazel_gazelle_go_repository_config/BUILD.bazel; however, a source file of this name exists.  (Perhaps add 'exports_files(["WORKSPACE"])' to /BUILD?)
ERROR: /home/ubuntu/ondc-opencommerce/BUILD.bazel:20:8: every rule of type _gazelle_runner implicitly depends upon the target '@@bazel_gazelle_go_repository_config//:WORKSPACE', but this target could not be found because of: no such target '@@bazel_gazelle_go_repository_config//:WORKSPACE': target 'WORKSPACE' not declared in package '' defined by /home/ubuntu/.cache/bazel/_bazel_ubuntu/4d8539e13e037cd09a1afca9813cd5e3/external/bazel_gazelle_go_repository_config/BUILD.bazel; however, a source file of this name exists.  (Perhaps add 'exports_files(["WORKSPACE"])' to /BUILD?)
ERROR: Analysis of target '//:gazelle-update-repos' failed; build aborted: Analysis failed
INFO: Elapsed time: 1.540s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

I tried adding exports_files(["WORKSPACE"]) at the end of BUILD.bazel but still getting the same error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions