diff --git a/packages/concatjs/internal/BUILD.bazel b/packages/concatjs/internal/BUILD.bazel index d4afc4bb1f..725a1d2291 100644 --- a/packages/concatjs/internal/BUILD.bazel +++ b/packages/concatjs/internal/BUILD.bazel @@ -97,9 +97,11 @@ nodejs_binary( "@npm//typescript", ], entry_point = ":tsc_wrapped/tsc_wrapped.js", - # With RBE or --worker_sandboxing you'll see that when supports_workers=True it doesn't run_node - # so it doesn't have the linker. Still needs our custom patches on require() - templated_args = ["--bazel_patch_module_resolver"], + # Disables the Bazel node modules linker. The node module linker is unreliable for the + # persistent worker executable, as it would rely on the `node_modules/` folder in the + # execroot that can be shared in non-sandbox environments or for persistent workers. + # https://docs.bazel.build/versions/main/command-line-reference.html#flag--worker_sandboxing. + templated_args = ["--nobazel_run_linker"], visibility = ["//visibility:public"], )