Skip to content

Commit

Permalink
fix: improve npm_link_all_packages() unknown project error
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedard committed Jun 29, 2023
1 parent e8278a0 commit 4d85082
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion npm/private/npm_translate_lock_generate.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ load("@aspect_rules_js//npm/private:npm_package_store.bzl", _npm_package_store =
is_root = native.package_name() == root_package
link = native.package_name() in link_packages
if not is_root and not link:
msg = "The npm_link_all_packages() macro loaded from {defs_bzl_file} and called in bazel package '%s' may only be called in bazel packages that correspond to the pnpm root package '{root_package}' and pnpm workspace projects {link_packages_comma_separated}" % native.package_name()
msg = "The npm_link_all_packages() macro loaded from {defs_bzl_file} and called in bazel package '%s' may only be called in bazel packages that correspond to the pnpm root package or pnpm workspace projects. Projects are discovered from the pnpm-lock.yaml and may be missing if the lockfile is out of date. Root package: '{root_package}', pnpm workspace projects: {link_packages_comma_separated}" % native.package_name()
fail(msg)
link_targets = []
scope_targets = {{}}
Expand Down

0 comments on commit 4d85082

Please sign in to comment.