fix(docker): copy linear-import package.json before frozen install (fixes TS2688 build failure)#1934
Conversation
The Dockerfile pre-copies each workspace package's package.json before 'RUN pnpm install --frozen-lockfile' (a layer-caching optimization), but the list omits plugins/fusion-plugin-linear-import, which pnpm-workspace.yaml lists as a workspace member. Because its package.json is absent during the frozen install layer, pnpm never links that package's devDependencies (@types/node, @types/react), so the later 'pnpm build' fails compiling it with TS2688 'Cannot find type definition file for node/react'. Add the missing COPY line so the plugin's manifest is present during the install layer, matching every other workspace plugin.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Dockerfile builder stage adds a single COPY instruction to include plugins/fusion-plugin-linear-import/package.json in the build context, ensuring its manifest is available for the subsequent pnpm install --frozen-lockfile step. ChangesDockerfile Build Context Update
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR fixes the Docker workspace install layer for the linear import plugin. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "fix(docker): copy linear-import package...." | Re-trigger Greptile |
Problem
docker build(anddocker compose up --build) fails during theRUN pnpm buildlayer while compilingplugins/fusion-plugin-linear-import:even though the prior
RUN pnpm install --frozen-lockfilelayer reports success.Root cause
The builder stage pre-copies each workspace package's
package.jsonbeforeRUN pnpm install --frozen-lockfile(a layer-caching optimization), then doesCOPY . .afterward.pnpm-workspace.yamllistsplugins/fusion-plugin-linear-importas a workspace member, but the Dockerfile's pre-copy list has aCOPY plugins/<name>/package.jsonline for every plugin exceptfusion-plugin-linear-import.Because that manifest is missing during the frozen-install layer, pnpm never links the plugin's devDependencies (
@types/node,@types/react) into its resolution scope. Whenpnpm buildlater runstscfor that package (itstsconfig.jsonusestypes: ["node", "react"]), TypeScript can't find the type definitions — theTS2688failure above.Fix
Add the single missing pre-copy line so
fusion-plugin-linear-import's manifest is present during the install layer, exactly like every other workspace plugin:COPY plugins/fusion-plugin-linear-import/package.json ./plugins/fusion-plugin-linear-import/package.jsonOne-line, additive change; no behavior change beyond making the image build.
Verification
mainand at the latest release tagv0.56.1.pnpm-workspace.yaml, sopnpm install --frozen-lockfilelinks@types/node/@types/reactfor the plugin and thepnpm buildtscstep no longer reportsTS2688.Summary by CodeRabbit