error: no such package '//third_party/protobuf' during Bazel analysis
Goal Understand why Bazel emits the error “error: no such package” for a target that appears to have a correct BUILD file, focusing on the analysis phase and how the message varies across Bazel versions. Constraints and uncertainty In Bazel 5.x the error includes the missing package path, whereas Bazel 4.x may omit the path unless the build is run with --ver