[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live) [Help](/c/help/9) # Turborepo and Vercel build issue ENOENT: no such file or directory 47 views · 2 likes · 4 posts Paul van Dyk (@paulvandyk) · 2026-02-08 <!-- Questions that get answered the fastest are the ones with relevant info included in the original post. Be sure to include all detail needed to let others see and understand the problem! --> <!-- Current versus Expected behavior --> <!-- Code, configuration, and steps that reproduce this issue --> <!-- Project information (URL, framework, environment, project settings) --> When merging my branch upstream I run into this build error on Vercel using Turborepo and Next.js: ``` Tasks: 2 successful, 2 total Cached: 2 cached, 2 total Time: 2.221s >>> FULL TURBO Summary: /vercel/path0/.turbo/runs/39PHPeF2uVdvebKyrgX8wVHabDk.json Traced Next.js server files in: 333.267ms Error: ENOENT: no such file or directory, lstat '/vercel/path0/node_modules/jszip/node_modules/lie/lib/index.js' ``` **Setup:** - Package manager: Bun - Using Turborepo with Next.js **Root turbo.json configuration:** ```json "build": { "dependsOn": ["^build"], "inputs": ["$TURBO_DEFAULT$", ".env*"], "outputs": [".next/**", "!.next/cache/**"] } ``` The error seems to be related to a nested dependency (jszip -> lie) not being found during the Vercel build process. The build works locally but fails when deployed to Vercel after merging upstream. It works when I do a redeploy without build cache on vercel. I have set my [root directory](https://vercel.com/docs/deployments/configure-a-build#root-directory) to `apps/dashboard` where my next.js app is located in the repo. Swarnava Sengupta (@swarnava) · 2026-02-09 · ♥ 1 This error means it can’t find the file, and most likely it means it can’t find *any* node_modules If you are passing .vercel and .next to the deploy layer, you’ll need to either * install modules in the deploy layer * or pass node_modules from build into the deploy layer Paul van Dyk (@paulvandyk) · 2026-02-09 · ♥ 1 Thanks for the response! I think I saw the same message duplicated in [another thread](https://community.vercel.com/t/turborepo-vercel-github-actions-enoent-no-such-file-or-directory/21082/3). But could you clarify what you mean by "deploy layer"? If there's documentation on how to configure this, I'd appreciate a link. --- **Update: I believe I found the root cause** I had numerous packages listed in `serverExternalPackages` in my `next.config.ts` that are no longer needed in our application. This may also be related to recent improvements in Turbopack's bundling behavior. After removing these entries, the build appears to work correctly: ```ts const nextConfig = { //... serverExternalPackages: [ "pino", "pino-pretty", // Fix bundling warnings for legacy packages "fstream", "rimraf", "glob", "minimatch", "brace-expansion", // ExcelJS and its dependencies "exceljs", "jszip", "lie", "unzipper", "minimatch", "graphql", "@aws-amplify/pubsub", "@aws-amplify/api-graphql", "@sentry/node", ] } export default nextConfig; ``` This fix isn't 100% confirmed yet, but I'll monitor the builds throughout the day and update if I encounter any issues. Anshuman Bhardwaj (@anshumanb) · 2026-02-09 Hi Paul, thanks for sharing your interim solution. Feel free to post here if you come across this issue again.