In projects that
- use bazel
- have client apps whose node_modules folder contains rxjs
It is not possible to go “bazel build …” at the top level, because bazel gets confused by rxjs’ bazel files.
- Be in a folder, in a bazel workspace, above a client application that depends (perhaps indirectly) on rxjs
bazel build ...and observe output:
ERROR: error loading package 'MY_CLIENT_APP/client/node_modules/rxjs/src': Extension file not found. Unable to load package for '@build_bazel_rules_typescript//:defs.bzl': The repository could not be resolved INFO: Elapsed time: 2.643s INFO: 0 processes. FAILED: Build did NOT complete successfully (1 packages loaded) currently loading: MY_CLIENT_APP/client/node_modules/rxjs/src
$ bazel version Build label: 0.13.0-homebrew
Please have a release step that expunges or renames bazel files, or does some other trick, s.t. this problem does not occur when your module is brought into bazel projects.
Workaround only: doing local_repository() hacks in our WORKSPACE, or having a script that deletes the files as a hack.