question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error message is incorrect

See original GitHub issue

Description 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:open
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
maaptehcommented, Aug 31, 2022

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 message

ERROR: no such package '@npm//@bazel/typescript': Error applying patch //packages/components/page:package.json.patch in _:
patching file packages/components/page/package.json
patch unexpectedly ends in middle of line

As soon as our CI is up again i can test this simple step.

1reaction
sgowrojicommented, Aug 30, 2022

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Messages: Examples, Best Practices & Common Mistakes
Another terrible experience is when an error message is ambiguous, probing you to ask, “Well, why was that wrong?!
Read more >
Error Messages in Windows 7 - Win32 apps | Microsoft Learn
Error messages in Windows 7 alert users of problems that have already occurred.
Read more >
6 Form Error Message Mistakes Almost Everyone Makes
When someone enters an incorrect piece of information in your form, an error message is what pops up (in the best case scenario, ......
Read more >
Understanding Email Errors and Error Messages
Email error messages can be broken down into three groups. Look for the error message that most closely matches the one you received....
Read more >
How to Write a Perfect Error Message | by Vitaly Dulenko
1. Error message should be clear. The error messages should clearly define what the problem was, why it happened, and what to do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found