Skip to content

fix(docker): copy linear-import package.json before frozen install (fixes TS2688 build failure)#1934

Merged
gsxdsm merged 1 commit into
Runfusion:mainfrom
Automata-intelligentsia:fix/dockerfile-copy-linear-import
Jul 7, 2026
Merged

fix(docker): copy linear-import package.json before frozen install (fixes TS2688 build failure)#1934
gsxdsm merged 1 commit into
Runfusion:mainfrom
Automata-intelligentsia:fix/dockerfile-copy-linear-import

Conversation

@Automata-intelligentsia

@Automata-intelligentsia Automata-intelligentsia commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Problem

docker build (and docker compose up --build) fails during the RUN pnpm build layer while compiling plugins/fusion-plugin-linear-import:

error TS2688: Cannot find type definition file for 'node'.
error TS2688: Cannot find type definition file for 'react'.

even though the prior RUN pnpm install --frozen-lockfile layer reports success.

Root cause

The builder stage pre-copies each workspace package's package.json before RUN pnpm install --frozen-lockfile (a layer-caching optimization), then does COPY . . afterward. pnpm-workspace.yaml lists plugins/fusion-plugin-linear-import as a workspace member, but the Dockerfile's pre-copy list has a COPY plugins/<name>/package.json line for every plugin except fusion-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. When pnpm build later runs tsc for that package (its tsconfig.json uses types: ["node", "react"]), TypeScript can't find the type definitions — the TS2688 failure 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.json

One-line, additive change; no behavior change beyond making the image build.

Verification

  • Confirmed the omission is present on main and at the latest release tag v0.56.1.
  • With the line added, the pre-copied manifest set matches pnpm-workspace.yaml, so pnpm install --frozen-lockfile links @types/node/@types/react for the plugin and the pnpm build tsc step no longer reports TS2688.

Summary by CodeRabbit

  • Chores
    • Updated the build setup to include an additional package manifest during installation, helping ensure the container build completes consistently.

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.
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8dfa1d0e-8721-4667-8e23-f90d1a188c26

📥 Commits

Reviewing files that changed from the base of the PR and between ed136b1 and fb43faf.

📒 Files selected for processing (1)
  • Dockerfile

📝 Walkthrough

Walkthrough

The 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.

Changes

Dockerfile Build Context Update

Layer / File(s) Summary
Add plugin package.json to build context
Dockerfile
Adds a COPY instruction in the builder stage to include plugins/fusion-plugin-linear-import/package.json alongside other package.json files before running pnpm install.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the Dockerfile fix and the TS2688 build failure it addresses.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes the Docker workspace install layer for the linear import plugin. The main changes are:

  • Adds the plugin manifest to the builder-stage pre-copy list.
  • Keeps pnpm install --frozen-lockfile aligned with the workspace package set.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
Dockerfile Adds the missing linear-import package manifest before the frozen pnpm install in the Docker builder stage.

Reviews (1): Last reviewed commit: "fix(docker): copy linear-import package...." | Re-trigger Greptile

@gsxdsm gsxdsm merged commit 7194308 into Runfusion:main Jul 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants