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] + autoprefixer@10.4.19
[21:48:26.291] + daisyui@4.8.0
[21:48:26.291] + eslint@8.57.0
[21:48:26.291] + eslint-config-next@14.1.4
[21:48:26.291] + postcss@8.4.38
[21:48:26.291] + tailwindcss@3.4.1
[21:48:26.291] + @emotion/react@11.11.4
[21:48:26.291] + @emotion/styled@11.11.0
[21:48:26.291] + @gsap/react@2.1.0
[21:48:26.292] + @hookform/resolvers@3.4.0
[21:48:26.292] + @phosphor-icons/react@2.1.5
[21:48:26.292] + @radix-ui/react-accordion@1.1.2
[21:48:26.292] + @radix-ui/react-checkbox@1.0.4
[21:48:26.292] + @radix-ui/react-dialog@1.0.5
[21:48:26.292] + @radix-ui/react-dropdown-menu@2.0.6
[21:48:26.292] + @radix-ui/react-label@2.0.2
[21:48:26.292] + @radix-ui/react-navigation-menu@1.1.4
[21:48:26.292] + @radix-ui/react-popover@1.0.7
[21:48:26.292] + @radix-ui/react-scroll-area@1.0.5
[21:48:26.292] + @radix-ui/react-separator@1.0.3
[21:48:26.292] + @radix-ui/react-slot@1.0.2
[21:48:26.292] + @radix-ui/react-switch@1.0.3
[21:48:26.293] + @radix-ui/react-tooltip@1.0.7
[21:48:26.293] + @stripe/react-stripe-js@2.7.1
[21:48:26.293] + @stripe/stripe-js@3.4.1
[21:48:26.293] + @studio-freight/lenis@1.0.42
[21:48:26.293] + @supabase/ssr@0.3.0
[21:48:26.293] + @supabase/supabase-js@2.43.2
[21:48:26.293] + @tanstack/react-query@5.37.1
[21:48:26.293] + @tanstack/react-query-devtools@5.37.1
[21:48:26.293] + axios@1.7.2
[21:48:26.293] + class-variance-authority@0.7.0
[21:48:26.293] + clsx@2.1.1
[21:48:26.293] + date-fns@3.6.0
[21:48:26.293] + firebase@10.11.1
[21:48:26.293] + framer-motion@11.2.4
[21:48:26.294] + gsap@3.12.5
[21:48:26.294] + locomotive-scroll@5.0.0-beta.11
[21:48:26.294] + lucide-react@0.378.0
[21:48:26.294] + mongodb@6.5.0
[21:48:26.294] + mongoose@8.3.3
[21:48:26.294] + next@14.2.3
[21:48:26.294] + next-auth@4.24.7
[21:48:26.294] + next-themes@0.3.0
[21:48:26.294] + react@18.2.0
[21:48:26.294] + react-apexcharts@1.4.1
[21:48:26.294] + react-day-picker@8.10.1
[21:48:26.294] + react-dom@18.2.0
[21:48:26.294] + react-hook-form@7.51.4
[21:48:26.294] + shadcn-ui@0.8.0
[21:48:26.294] + stripe@15.8.0
[21:48:26.294] + tailwind-merge@2.3.0
[21:48:26.294] + tailwindcss-animate@1.0.7
[21:48:26.294] + vaul@0.9.1
[21:48:26.294] + zod@3.23.8
[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