Description
Admittedly, this might be more WAI then a bug, and we can likely work around it, but filing as a bug in case y'all decide it's a necessary feature.
We have local packages which we reference via a file:
protocol. When we have them in our pnpm-lock.yaml
and execute a bazel sync
with rules_js@0.11.0
, we get the following error:
ERROR: An error occurred during the fetch of repository 'npm':
Traceback (most recent call last):
File "/private/var/tmp/_bazel_vasilios/96c9699731d9b99e83af4f7d36096194/external/aspect_rules_js/npm/private/npm_translate_lock.bzl", line 319, column 33, in _impl
lockfile = _process_lockfile(rctx)
File "/private/var/tmp/_bazel_vasilios/96c9699731d9b99e83af4f7d36096194/external/aspect_rules_js/npm/private/npm_translate_lock.bzl", line 145, column 43, in _process_lockfile
return translate_to_transitive_closure(lockfile, rctx.attr.prod, rctx.attr.dev, rctx.attr.no_optional)
File "/private/var/tmp/_bazel_vasilios/96c9699731d9b99e83af4f7d36096194/external/aspect_rules_js/npm/private/transitive_closure.bzl", line 86, column 17, in translate_to_transitive_closure
fail("unsupported package path " + package_path)
Error in fail: unsupported package path file:packages-dist/admin-bunsen
Similar to #166, the error here is in recognition of the listed packages
, which in this case begin with file:
and have a resolution.directory
entry. We can/will prune these from the pnpm-lock.yaml
, as we'd prefer local packages to reference each other via local bazel
targets. But it is possibly worth an explicit comment that local packages are not allowed, or some feature allowing them to be ignored when processing pnpm-lock.yaml
?