From 09eb604b3d166e7bcf4d606c190eed5640129e16 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Sun, 5 Apr 2026 13:48:38 -0400 Subject: [PATCH] Fix injected deps sync when turbo replays cached builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two issues caused the deploy preview docs-app build to fail with: Rollup failed to resolve import "ember-primitives/on-resize" 1. The //#sync turbo task was cached, so the root sync script was replayed from cache logs instead of re-executed after builds. Fix: add "cache": false to //#sync. 2. The sync scripts in docs-app and test-app were no-op echo stubs, relying on pnpm's sync-injected-deps-after-scripts hook. But that hook only fires when pnpm itself runs the build script — not when turbo restores outputs from cache. Fix: change sync scripts to run pnpm install --frozen-lockfile, which re-syncs injected deps. Co-Authored-By: Claude Opus 4.6 (1M context) --- docs-app/package.json | 2 +- test-app/package.json | 2 +- turbo.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs-app/package.json b/docs-app/package.json index 44e9228f2..0d7ce155a 100644 --- a/docs-app/package.json +++ b/docs-app/package.json @@ -24,7 +24,7 @@ "format": "prettier --write .", "start": "pnpm vite", "dev": "vite", - "sync": "echo 'pnpm is syncing injected deps. (this is configured in .npmrc)'", + "sync": "pnpm install --frozen-lockfile", "test:ember": "vite build --mode development && testem ci --port 0" }, "dependencies": { diff --git a/test-app/package.json b/test-app/package.json index c58589a40..eb15cc1af 100644 --- a/test-app/package.json +++ b/test-app/package.json @@ -22,7 +22,7 @@ "format": "prettier --write .", "start": "pnpm vite", "dev": "vite", - "sync": "echo 'pnpm is syncing injected deps. (this is configured in .npmrc)'", + "sync": "pnpm install --frozen-lockfile", "test:ember": "vite build --mode development && testem ci --port 0" }, "dependencies": { diff --git a/turbo.json b/turbo.json index 9fb7c025e..32812ebf0 100644 --- a/turbo.json +++ b/turbo.json @@ -79,7 +79,7 @@ "outputs": ["dist/**", "dist-types/**", "declarations/**", "docs.json"], "dependsOn": ["_syncPnpm", "//#sync"] }, - "//#sync": {}, + "//#sync": { "cache": false }, "_syncPnpm": { "dependsOn": ["^build"], "cache": false