Search code examples
javascriptnext.jsvercelbun

Vercel error | ENOENT: no such file or directory


No matter what I try, I always receive this error at the end of the deployment logs in Vercel:

Error: ENOENT: no such file or directory, lstat '/vercel/path0/.next/server/app/(main)/(pages)/page_client-reference-manifest.js'

Github repo

Complete build log:

[21:48:20.251] Running "vercel build"
[21:48:20.691] Vercel CLI 34.2.3
[21:48:21.864] Installing dependencies...
[21:48:21.903] bun install v1.1.9 (bb13798d)
[21:48:21.916] Resolving dependencies
[21:48:22.360] Resolved, downloaded and extracted [8]
[21:48:26.290] Saved lockfile
[21:48:26.291] 
[21:48:26.291] + [email protected]
[21:48:26.291] + [email protected]
[21:48:26.291] + [email protected]
[21:48:26.291] + [email protected]
[21:48:26.291] + [email protected]
[21:48:26.291] + [email protected]
[21:48:26.291] + @emotion/[email protected]
[21:48:26.291] + @emotion/[email protected]
[21:48:26.291] + @gsap/[email protected]
[21:48:26.292] + @hookform/[email protected]
[21:48:26.292] + @phosphor-icons/[email protected]
[21:48:26.292] + @radix-ui/[email protected]
[21:48:26.292] + @radix-ui/[email protected]
[21:48:26.292] + @radix-ui/[email protected]
[21:48:26.292] + @radix-ui/[email protected]
[21:48:26.292] + @radix-ui/[email protected]
[21:48:26.292] + @radix-ui/[email protected]
[21:48:26.292] + @radix-ui/[email protected]
[21:48:26.292] + @radix-ui/[email protected]
[21:48:26.292] + @radix-ui/[email protected]
[21:48:26.292] + @radix-ui/[email protected]
[21:48:26.292] + @radix-ui/[email protected]
[21:48:26.293] + @radix-ui/[email protected]
[21:48:26.293] + @stripe/[email protected]
[21:48:26.293] + @stripe/[email protected]
[21:48:26.293] + @studio-freight/[email protected]
[21:48:26.293] + @supabase/[email protected]
[21:48:26.293] + @supabase/[email protected]
[21:48:26.293] + @tanstack/[email protected]
[21:48:26.293] + @tanstack/[email protected]
[21:48:26.293] + [email protected]
[21:48:26.293] + [email protected]
[21:48:26.293] + [email protected]
[21:48:26.293] + [email protected]
[21:48:26.293] + [email protected]
[21:48:26.293] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] + [email protected]
[21:48:26.294] 
[21:48:26.294] 731 packages installed [4.41s]
[21:48:26.294] 
[21:48:26.294] Blocked 1 postinstall. Run `bun pm untrusted` for details.
[21:48:26.327] Detected Next.js version: 14.2.3
[21:48:26.331] Running "bun run build"
[21:48:26.337] $ next build
[21:48:26.973] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[21:48:26.974] This information is used to shape Next.js' roadmap and prioritize features.
[21:48:26.974] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[21:48:26.974] https://nextjs.org/telemetry
[21:48:26.974] 
[21:48:27.035]   ▲ Next.js 14.2.3
[21:48:27.036] 
[21:48:27.113]    Creating an optimized production build ...
[21:49:10.370]  ✓ Compiled successfully
[21:49:10.371]    Linting and checking validity of types ...
[21:49:13.211] 
[21:49:13.211] ./src/app/(main)/(pages)/dashboard/dashboard.js
[21:49:13.211] 79:6  Warning: React Hook useEffect has a missing dependency: 'selectedEvent'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[21:49:13.211] 
[21:49:13.211] ./src/app/completion/completion.js
[21:49:13.212] 28:6  Warning: React Hook useLayoutEffect has a missing dependency: 'router'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[21:49:13.212] 
[21:49:13.212] ./src/app/signin/page.js
[21:49:13.212] 39:6  Warning: React Hook useEffect has a missing dependency: 'params'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[21:49:13.212] 
[21:49:13.212] ./src/components/sidebar/index.jsx
[21:49:13.212] 23:6  Warning: Image elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text
[21:49:13.212] 
[21:49:13.212] ./src/components/ui/infinite-moving-cards.jsx
[21:49:13.212] 18:5  Warning: React Hook useEffect has a missing dependency: 'addAnimation'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[21:49:13.212] 
[21:49:13.212] info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
[21:49:13.212]    Collecting page data ...
[21:49:15.988]    Generating static pages (0/25) ...
[21:49:16.364]    Generating static pages (6/25) 
[21:49:16.529]    Generating static pages (12/25) 
[21:49:16.664]    Generating static pages (18/25) 
[21:49:16.844]  ✓ Generating static pages (25/25)
[21:49:17.350]    Finalizing page optimization ...
[21:49:17.350]    Collecting build traces ...
[21:49:23.483] 
[21:49:23.502] Route (app)                              Size     First Load JS
[21:49:23.502] ┌ ○ /                                    67.5 kB         236 kB
[21:49:23.502] ├ ○ /_not-found                          875 B          88.1 kB
[21:49:23.502] ├ ƒ /api/auth/[...nextauth]              0 B                0 B
[21:49:23.502] ├ ƒ /api/createPaymentIntent             0 B                0 B
[21:49:23.502] ├ ƒ /api/endTutorial                     0 B                0 B
[21:49:23.502] ├ ƒ /api/events                          0 B                0 B
[21:49:23.502] ├ ƒ /api/events/[id]                     0 B                0 B
[21:49:23.502] ├ ƒ /api/getOrgMembers                   0 B                0 B
[21:49:23.502] ├ ƒ /api/paybill                         0 B                0 B
[21:49:23.502] ├ ƒ /api/roles                           0 B                0 B
[21:49:23.502] ├ ƒ /api/roles/all                       0 B                0 B
[21:49:23.502] ├ ƒ /api/users/[...id]                   0 B                0 B
[21:49:23.502] ├ ƒ /api/webhooks/stripe                 0 B                0 B
[21:49:23.502] ├ ƒ /checkout/[id]                       6.39 kB         123 kB
[21:49:23.502] ├ ○ /completion                          680 B          99.7 kB
[21:49:23.502] ├ ○ /contact                             857 B          88.1 kB
[21:49:23.502] ├ ƒ /dashboard                           25.5 kB         178 kB
[21:49:23.502] ├ ƒ /organization-details                3.21 kB         121 kB
[21:49:23.502] ├ ƒ /people                              14.3 kB         157 kB
[21:49:23.502] ├ ○ /privacy-policy                      146 B          87.4 kB
[21:49:23.502] ├ ○ /signin                              2.6 kB          108 kB
[21:49:23.503] ├ ○ /signup                              1.49 kB          99 kB
[21:49:23.503] ├ ○ /signup/admin                        4.23 kB         142 kB
[21:49:23.503] ├ ○ /subscribe                           4.33 kB         165 kB
[21:49:23.503] ├ ○ /subscribe/success                   451 B          87.7 kB
[21:49:23.503] └ ○ /terms-and-conditions                146 B          87.4 kB
[21:49:23.503] + First Load JS shared by all            87.3 kB
[21:49:23.503]   ├ chunks/23-423d56362cb408b4.js        31.6 kB
[21:49:23.503]   ├ chunks/fd9d1056-ad73cf74b6ee4fd5.js  53.6 kB
[21:49:23.503]   └ other shared chunks (total)          2 kB
[21:49:23.503] 
[21:49:23.503] 
[21:49:23.503] ƒ Middleware                             50 kB
[21:49:23.503] 
[21:49:23.503] ○  (Static)   prerendered as static content
[21:49:23.503] ƒ  (Dynamic)  server-rendered on demand
[21:49:23.503] 
[21:49:23.612] Traced Next.js server files in: 33.442ms
[21:49:27.036] Error: ENOENT: no such file or directory, lstat '/vercel/path0/.next/server/app/(main)/(pages)/page_client-reference-manifest.js'
[21:49:27.749] 

I could only think of was redeploying, with and without reusing build cache, but that did not change anything. I tried removing and re-integrating vercel and creating a new github repo with no luck. Any help would be much appreciated.


Solution

  • I found the problem: I have a page.js file in src/app/(main)/(pages)/page.js

    This page does not do anything... not sure why it's even there, but for anyone else facing this error, check for useless page.js files in route groups