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

esbuild README could benefit from docs on required rules_nodejs version #2493

Closed
bduffany opened this issue Feb 28, 2021 · 3 comments · Fixed by #2500
Closed

esbuild README could benefit from docs on required rules_nodejs version #2493

bduffany opened this issue Feb 28, 2021 · 3 comments · Fixed by #2500

Comments

@bduffany
Copy link
Contributor

I ran into this issue when trying to use esbuild:

        File "/home/b/.cache/bazel/_bazel_b/b1efedad95ff8a846adc47f250b077fb/external/npm/@bazel/esbuild/esbuild.bzl", line 6, column 75, in <toplevel>
                load("@build_bazel_rules_nodejs//internal/linker:link_node_modules.bzl", "MODULE_MAPPINGS_ASPECT_RESULTS_NAME", "module_mappings_aspect")
Error: file '@build_bazel_rules_nodejs//internal/linker:link_node_modules.bzl' does not contain symbol 'MODULE_MAPPINGS_ASPECT_RESULTS_NAME'

Guessing it's because I'm on an outdated version of rules_nodejs (^2.3.0) -- but the README in @bazel/esbuild doesn't mention which version is required -- might be useful to add docs on the required version so that other folks don't run into this issue :)

@bduffany bduffany changed the title esbuild README doesn't document required version esbuild README could benefit from docs on required version Feb 28, 2021
@bduffany bduffany changed the title esbuild README could benefit from docs on required version esbuild README could benefit from docs on required rules_nodejs version Feb 28, 2021
@mattem
Copy link
Collaborator

mattem commented Feb 28, 2021

It's expected that the version of rules_nodejs in the bazel WORKSPACE match the @bazel packages in the package.json file.
However, we should explicitly call this out somewhere if we don't already, I think it's only hinted at in the release notes.
Note that this isn't specific to the esbuild package.

@bduffany
Copy link
Contributor Author

bduffany commented Feb 28, 2021

Might be more friendly for the tooling itself to print a warning when the versions don't match (or even error out, if that makes sense?) -- is that something that seems possible to do? I wouldn't mind contributing a PR but not exactly sure where to start

@mattem
Copy link
Collaborator

mattem commented Mar 4, 2021

Ah yeah, we do already have that, seems it wasn't included in the package.json postinstall for the esbuild package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants