Ship worker-bundler in the self-host Docker runtime#1390
Merged
Conversation
The dynamic Worker bundler change made plugin-apps resolve @cloudflare/worker-bundler at runtime via import.meta.resolve, but package-runtime.ts never copied the package into the self-host image, so serve.js crashed on startup with a module-not-found error. Copy the package alongside the other runtime externals and pre-bundle dist/index.bundled.js at build time (the npm package does not ship it and the distroless runtime has no esbuild for the fallback), mirroring what apps/cli/src/build.ts does for the packed CLI. The CI smoke job only built the image, which is exactly why this slipped through: boot the container and require a healthy /api/health as well.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 2679f7f | Commit Preview URL Branch Preview URL |
Jul 10 2026, 05:42 AM |
Contributor
Cloudflare previewTorn down — the PR is closed. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 2679f7f | Jul 10 2026, 05:44 AM |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
RhysSullivan
marked this pull request as ready for review
July 10, 2026 05:47
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The self-host image crashed on startup with
Cannot find module '@cloudflare/worker-bundler'since the dynamic Worker bundler change: the package is resolved at runtime but was never copied into the packaged runtime.Copies it in package-runtime.ts (with a pre-bundled entry, since the runtime image has no esbuild for the fallback), and extends the CI docker smoke job to boot the container and require a healthy /api/health instead of only building the image.