error message is incorrect
See original GitHub issueDescription of the bug:
When i forgot to include my own package in the workspace of a monorepo, lets asume @mpth/foo
a fresh yarn install suddenly throws a message like:
ERROR: no such package '@npm//typescript': yarn_install failed: ➤ YN0000: ┌ Resolution step
While this is, and can not even be possible, not the real error. The real error was that i forgot to include the package @mpth/foo
as part of our yarn install.
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")
yarn_install(
...snip...
args=["--immutable"],
data = [
"@//:.yarnrc.yml",
"@//packages/mpth/foo
What’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Run yarn with immutable command, add an internal package with some deps, and even blank BAZEL.build file
Its important to have new deps, which are not being added in any other package. Then run locally yarn
to generate a lockfile. Then do the Bazel stuff.
So run:
bazel test --test_tag_filters=format --build_tests_only //...
You will now see an missing message about @npm in another bazel package
Which operating system are you running Bazel on?
osx
What is the output of bazel info release
?
release 5.2.0
If bazel info release
returns development version
or (@non-git)
, tell us how you built Bazel.
No response
What’s the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD
?
private repo
Have you found anything relevant by searching the web?
At first i thought the issue was related to https://github.com/bazelbuild/rules_nodejs/issues/628#issuecomment-477211883 because in the new package i forgot a bazel build file since it was internal tooling (eslint settings). But then it turned out i forgot to simply include the package at yarn_install step. Since in that package only eslint plugins where added it made no sense it complained about @npm//typescript missing, and then i found out this is just a generic error
Any other information, logs, or outputs that you want to share?
No response
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
At the moment our azure environment is broken, so i cant run in CI. But i think our CI truncates the message.
Locally i also get the same start of the error
ERROR: no such package '@npm//@bazel/typescript'
when i try to patch it for example with a wrong patch during a simple yarn install stage. I can see exactly the first part of the message above, but locally with an Error directly applied after this messageAs soon as our CI is up again i can test this simple step.
@maapteh, If you are pointing about this https://github.com/bazelbuild/bazel/issues/16187. We have already shared it to a concerned team, who will be looking over and update you soon. Thanks for being patience.