Hello all,
We’ve been working on upgrading our monorepo project, which uses Turborepo, Next.js, and React, to the latest versions. We've followed each upgrade guide carefully and migrated everything accordingly.
Both next build and development (next dev) are working perfectly when run locally in each of our monorepos. However, the problem arises when we try to build the project on Vercel.
Here’s what we’ve tried so far to resolve the issue:
- Moved react, react-dom, and their respective types from the child
package.jsonfiles to the rootpackage.json. - Added
CI=falseto the environment variables. - Fixed types and resolved any potential issues that could break the build (as mentioned, the build works fine locally).
- Cleared the
package-lock.json,package.json, andnode_modulesover 20 times, followed by fresh installations. - Investigated potential issues related to Prisma, as it was one of our initial suspects.
- Tried numerous other fixes.
Despite all these efforts, nothing has resolved the issue. We keep encountering the same error on Vercel without any detailed logs, even after trying to enable more verbose logging.
It’s worth noting that the other repositories in our monorepo build successfully—this issue is limited to the largest one.
Any suggestions or insights would be greatly appreciated!
node: 20.xreact: 19.0.0next: 15.1.6turbo: 2.3.3Last build logs:
[15:18:34.464] Running build in Washington, D.C., USA (East) – iad1[15:18:34.571] Cloning github.com/koslib/schedulthreads (Branch: staging, Commit: a3cf288)[15:18:34.584] VERCEL_FORCE_NO_BUILD_CACHE is set so skipping build cache step[15:18:35.449] Cloning completed: 878.000ms[15:18:35.449] Running "npx turbo-ignore"[15:18:35.699] npm warn config ignoring workspace config at /vercel/path0/apps/web/.npmrc[15:18:35.699] [15:18:36.384] npm warn exec The following package was not found and will be installed: turbo-ignore@2.3.4[15:18:36.384] [15:18:36.733] ≫ Using Turborepo to determine if this project is affected by the commit...[15:18:36.733] [15:18:36.733] [15:18:36.736] ≫ Inferred "web" as workspace from "package.json"[15:18:36.737] [15:18:36.737] ≫ Inferred turbo version "^2.3.3" from "package.json"[15:18:36.737] ≫ Using "build" as the task from the arguments[15:18:36.737] [15:18:36.742] ≫ Previous deployment ("9b7d4b559d01b3582aa63e7db93bb30416765e94") for "web" on branch "staging" is unreachable.[15:18:36.743] [15:18:36.743] ✓ Proceeding with deployment[15:18:36.743] [15:18:37.210] Running "vercel build"[15:18:37.655] Vercel CLI 39.3.0[15:18:37.777] > Detected Turbo. Adjusting default settings...[15:18:37.993] Running "install" command: `npm install --legacy-peer-deps`...[15:18:38.150] npm warn config ignoring workspace config at /vercel/path0/apps/web/.npmrc[15:19:11.996] [15:19:11.996] added 1038 packages, and audited 1046 packages in 34s[15:19:11.997] [15:19:11.997] 190 packages are looking for fundingpackage.json
{ "name": "web", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev --turbopack", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "@atproto/api": "^0.13.31", "@atproto/oauth-client-node": "^0.2.8", "@aws-sdk/client-s3": "^3.735.0", "@aws-sdk/s3-request-presigner": "^3.735.0", "@clerk/nextjs": "^6.10.2", "@fullcalendar/core": "^6.1.15", "@fullcalendar/daygrid": "^6.1.15", "@fullcalendar/interaction": "^6.1.15", "@fullcalendar/list": "^6.1.15", "@fullcalendar/react": "^6.1.15", "@fullcalendar/timegrid": "^6.1.15", "@giphy/js-fetch-api": "^5.6.0", "@giphy/react-components": "^9.8.0", "@headlessui/react": "^2.2.0", "@hookform/resolvers": "^3.10.0", "@lemonsqueezy/lemonsqueezy.js": "^4.0.0", "@next/third-parties": "15.1.6", "@popperjs/core": "^2.11.8", "@prisma/client": "^5.20.0",