Worker Build Caching not working - pnpm monorepo
On any of my monorepos that use pnpm, the longest step when building on CF Workers is Installing dependencies. If I take a look at the logs, I see a
I'm using the following build commands:
Failed to restore dependencies from build cache. Skipping. message:
13:42:55.785 Initializing build environment...
13:43:07.022 Success: Finished initializing build environment
13:43:07.271 Cloning repository...
13:43:09.386 Restoring from dependencies cache
13:43:09.391 Restoring from build output cache
13:43:09.798 Success: Build output restored from build cache.
13:43:13.465 Detected the following tools from environment: nodejs@24.6.0, pnpm@10.15.0
13:43:13.471 Installing nodejs 24.6.0
13:43:19.446 Failed to restore dependencies from build cache. Skipping.
13:42:55.785 Initializing build environment...
13:43:07.022 Success: Finished initializing build environment
13:43:07.271 Cloning repository...
13:43:09.386 Restoring from dependencies cache
13:43:09.391 Restoring from build output cache
13:43:09.798 Success: Build output restored from build cache.
13:43:13.465 Detected the following tools from environment: nodejs@24.6.0, pnpm@10.15.0
13:43:13.471 Installing nodejs 24.6.0
13:43:19.446 Failed to restore dependencies from build cache. Skipping.
13:43:43.765 Installing project dependencies: pnpm install --frozen-lockfile
13:43:44.884 Scope: all 2 workspace projects
13:43:45.352 ../.. | Progress: resolved 1, reused 0, downloaded 0, added 0
13:43:45.717 ../.. | +1295 ++++++++++++++++++++++++++++
13:43:46.358 ../.. | Progress: resolved 1295, reused 6, downloaded 0, added 0
13:42:55.785 Initializing build environment...
13:43:07.022 Success: Finished initializing build environment
13:43:07.271 Cloning repository...
13:43:09.386 Restoring from dependencies cache
13:43:09.391 Restoring from build output cache
13:43:09.798 Success: Build output restored from build cache.
13:43:13.465 Detected the following tools from environment: nodejs@24.6.0, pnpm@10.15.0
13:43:13.471 Installing nodejs 24.6.0
13:43:19.446 Failed to restore dependencies from build cache. Skipping.
13:42:55.785 Initializing build environment...
13:43:07.022 Success: Finished initializing build environment
13:43:07.271 Cloning repository...
13:43:09.386 Restoring from dependencies cache
13:43:09.391 Restoring from build output cache
13:43:09.798 Success: Build output restored from build cache.
13:43:13.465 Detected the following tools from environment: nodejs@24.6.0, pnpm@10.15.0
13:43:13.471 Installing nodejs 24.6.0
13:43:19.446 Failed to restore dependencies from build cache. Skipping.
13:43:43.765 Installing project dependencies: pnpm install --frozen-lockfile
13:43:44.884 Scope: all 2 workspace projects
13:43:45.352 ../.. | Progress: resolved 1, reused 0, downloaded 0, added 0
13:43:45.717 ../.. | +1295 ++++++++++++++++++++++++++++
13:43:46.358 ../.. | Progress: resolved 1295, reused 6, downloaded 0, added 0
Build command:
pnpm run build && pnpm run db:migrate:prod
Deploy command:
pnpm wrangler deploy
Version command:
npx wrangler versions upload
Root directory:
/packages/app-main
Build command:
pnpm run build && pnpm run db:migrate:prod
Deploy command:
pnpm wrangler deploy
Version command:
npx wrangler versions upload
Root directory:
/packages/app-main
1 Reply
@Akryum were you able to solve this? running into a similar issue in a monorepo