I'm trying to build an app and deploy it using Vercel, but it throws this error log to me each time I try to deploy it.
Skipping build cache, deployment was triggered without cache.
Cloning completed: 301.935ms
Running "vercel build"
Vercel CLI 32.4.1
Installing dependencies...
added 791 packages in 18s
248 packages are looking for funding
run `npm fund` for details
Detected Next.js version: 13.5.4
Running "npm run build && npx convex deploy"
Creating an optimized production build ...
Failed to compile.
./app/(main)/layout.tsx
Module not found: Can't resolve './_components/navigation'
https://nextjs.org/docs/messages/module-not-found
./app/(marketting)/layout.tsx
Module not found: Can't resolve './_components/navbar'
https://nextjs.org/docs/messages/module-not-found
./app/(marketting)/page.tsx
Module not found: Can't resolve './_components/footer'
https://nextjs.org/docs/messages/module-not-found
./app/(marketting)/page.tsx
Module not found: Can't resolve './_components/heroes'
https://nextjs.org/docs/messages/module-not-found
./app/(marketting)/page.tsx
Module not found: Can't resolve './_components/heading'
https://nextjs.org/docs/messages/module-not-found
> Build failed because of webpack errors
Error: Command "npm run build && npx convex deploy" exited with 1
When I try to run the app locally, it doesn't show any of these import errors, and everything seems to work fine. I don't get an warnings or errors in my console either.
I've made sure my imports are correct. All files are lowercase and the exported components are capitalized. I have reflected the same casing in my imports but the build seems to fail each time with this log message. I even tried redeploying after deleting my .next folder in case of cache errors, but even that doesn't seem to work. Can anyone please help with this?
Thank you!