Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: bazel run -- @pnpm//:pnpm does not work #1737

Closed
peakschris opened this issue May 16, 2024 · 2 comments · Fixed by #1740
Closed

[Bug]: bazel run -- @pnpm//:pnpm does not work #1737

peakschris opened this issue May 16, 2024 · 2 comments · Fixed by #1740
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@peakschris
Copy link

What happened?

The documentation says that I should be able to invoke:

bazel run -- @pnpm//:pnpm --dir $PWD install --lockfile-only

However, on Windows, with rules_js 1.42.1 set up in MODULES.bazel with copy-and-paste from releases page, this command fails:

D:\udu\units\cb_0508_bazel>bazel run -- @pnpm//:pnpm --dir $PWD install --lockfile-only
WARNING: Target pattern parsing failed.
ERROR: Skipping '@pnpm//:pnpm': No repository visible as '@pnpm' from main repository
ERROR: No repository visible as '@pnpm' from main repository
INFO: Elapsed time: 0.744s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

Version

Development (host) and target OS/architectures:

Output of bazel --version:
7.2.0rc1

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:
1.42.1

Language(s) and/or frameworks involved:
javascript, node18.20.0

How to reproduce

No response

Any other information?

No response

@peakschris peakschris added the bug Something isn't working label May 16, 2024
@github-actions github-actions bot added the untriaged Requires traige label May 16, 2024
@alexeagle
Copy link
Member

You need to have a use_repo call to make it visible, like https://github.com/aspect-build/rules_js/blob/main/MODULE.bazel#L42

I'll update the release snippet we publish for MODULE.bazel since it ought to be in there

@alexeagle alexeagle added documentation Improvements or additions to documentation and removed untriaged Requires traige labels May 16, 2024
@peakschris
Copy link
Author

Excellent, this works well. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants