From b0b3d87fe2f3f3007cf75e01c2b22d364b112bad Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 3 Oct 2026 23:26:08 +0200 Subject: [PATCH] Run the toolchain's esbuild as itself: npm installs its native binary in place of the script --- internal/builder/builder.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/builder/builder.go b/internal/builder/builder.go index 1bc99d9..ecafc96 100644 --- a/internal/builder/builder.go +++ b/internal/builder/builder.go @@ -1271,8 +1271,9 @@ func bundled(ctx context.Context, run Runner, tree string, chain Toolchain, base launch = append(launch, out+"/"+l) } // Refused by name in an image that predates the bundler, as the dependencies copy is: a bundle - // packed without it would carry nothing it imports. - guard := `test -x "$0" || { echo "the toolchain image carries no bundler at $0: it predates one-file bundles, rebuild mesh-tools first" >&2; exit 1; }; exec node "$0" "$@"` + // packed without it would carry nothing it imports. Run as itself: npm installs esbuild's native + // binary in place of its script, which `node` cannot run. + guard := `test -x "$0" || { echo "the toolchain image carries no bundler at $0: it predates one-file bundles, rebuild mesh-tools first" >&2; exit 1; }; exec "$0" "$@"` step := func(entries []string, extra ...string) error { if len(entries) == 0 { return nil