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 fails when depending on a bundle in a local repository #65

Open
iteratee opened this issue Sep 4, 2022 · 0 comments
Open

esbuild fails when depending on a bundle in a local repository #65

iteratee opened this issue Sep 4, 2022 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@iteratee
Copy link

iteratee commented Sep 4, 2022

I have two bazel repositories, and I'd like for one to depend on the other. One defines an esbuild macro. (I tried with an esbuild_bundle rule as well), The second imports the first as a local repository:

In the second WORKSPACE, I have:

local_repository(
    name = "bridge-deal",
    path = "/home/kyle/devel/bridge-deal"
)

If I execute bazelisk build "@bridge-deal//:bundle I get the following error:

ERROR: /home/kyle/.cache/bazel/_bazel_kyle/81db66b89528850bd748567d4113aa93/external/bridge-deal/BUILD.bazel:4:15: Bundling Javascript ../bridge-deal/app.ts [esbuild] failed: (Exit 1): launcher.sh failed: error executing command bazel-out/k8-opt-exec-2B5CBBC6/bin/external/esbuild_linux-64/launcher.sh '--esbuild_args=../bridge-deal/bundle.args.json'

I've attached a minimal reproduction. In minimal-repro-js, bazelisk build //:bundle works. in minimal-repro, bazelisk build @minimal-repro-js//:bundle fails with an error similar to the one I posted above.
minimal-repro.tar.gz

Hopefully this gives you a hint as to where the problem is.

@gregmagolan gregmagolan added the bug Something isn't working label Sep 4, 2022
@gregmagolan gregmagolan added this to the 1.0 milestone Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: On Deck
Development

No branches or pull requests

4 participants