aspect-build / aspect-build/rules_js

[Bug]: better error message when virtual store not created by npm_link_all_packages

Open
#729 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Starlark
Stars
378
Forks
183
Avg merge
1d 9h
Merged PRs (30d)
32

Description

### What happened?

Here's a repro:

https://github.com/aspect-build/rules_ts/compare/fetch_subpkg

```shell
alexeagle@system76-pc:~/Projects/rules_ts$ cd e2e/bzlmod
alexeagle@system76-pc:~/Projects/rules_ts/e2e/bzlmod$ bazel fetch ...
ERROR: Evaluation of query "deps(...)" failed: preloading transitive closure failed: no such target '//:.aspect_rules_js/node_modules/long@5.2.1': target '.aspect_rules_js/node_modules/long@5.2.1' not declared in package '' defined by /home/alexeagle/Projects/rules_ts/e2e/bzlmod/BUILD (Tip: use `query "//:*"` to see all the targets in that package)
```

### Version

rules_js 1.8.0 and 1.11.1 at least

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure from e2e/bzlmod with bazel fetch ... and inspect the npm_link_all_packages entry point. Trace the missing .aspect_rules_js/node_modules/long@5.2.1 target from the reported BUILD error, then make the failure explain that the virtual store was not created and verify the repro produces the clearer message.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.