docs(dockerfile): warn about the npm omit=dev + tsc build trap in TypeScript Actors#2716
Draft
DaveHanns wants to merge 1 commit into
Draft
docs(dockerfile): warn about the npm omit=dev + tsc build trap in TypeScript Actors#2716DaveHanns wants to merge 1 commit into
DaveHanns wants to merge 1 commit into
Conversation
…eScript Actors The canonical Node.js Dockerfile on this page uses `npm install --omit=dev`, which drops `devDependencies` and thus removes `typescript` from the image. Any TypeScript Actor whose `build` script invokes `tsc` will fail inside the Docker build with `tsc: not found`. This is a recurring pitfall — agents and users both hit it once per new TS Actor, and each retry burns a remote build cycle. Add a `:::warning` callout under the sample Dockerfile with two concrete fixes (multi-stage build, or single-stage with devDeps kept in) and the failure signature so it can be recognized from logs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
|
✅ Preview for this PR (commit |
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.
Summary
Add a
:::warningcallout on the Source code page explaining thenpm install --omit=dev+tscbuild trap that breaks Docker builds for TypeScript Actors.Why
The canonical Dockerfile on this page uses
--omit=dev, which is correct for JavaScript Actors but silently dropstypescriptfrom the image. Any TS Actor whosebuildscript invokestscfails at image-build time withsh: tsc: not found, even though the code compiles cleanly locally. We see this hit every fresh TS Actor at least once — burning a remote build cycle each retry.The callout gives two concrete remediations (multi-stage build, or single-stage keeping devDeps) plus the failure signature so users searching their build logs can find it.
Test plan
ts-empty.