Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"no such file or directory" error when deploying with Vercel #57

Open
andordavoti opened this issue Jan 10, 2025 · 3 comments
Open

"no such file or directory" error when deploying with Vercel #57

andordavoti opened this issue Jan 10, 2025 · 3 comments

Comments

@andordavoti
Copy link

Each time I deploy with Vercel I'm getting this error:

Error: ENOENT: no such file or directory, lstat '/vercel/path0/APP_PATH/.contentlayer/generated/Doc/_index.json'

It always works with a redeploy if I don't use the existing build cache.

I'm getting this error after upgrading to Next.js 15 and migrating from contentlayer to contentlayer2.

@timlrx
Copy link
Owner

timlrx commented Jan 12, 2025

Hmm, strange. I have been using Vercel with Next 15 and contentlayer2 without issues for quite a while. Have you tried deleting the lock file? Also make sure that next-contentlayer is also upgraded to the new version.

@andordavoti
Copy link
Author

hmm this might have actually fixed it, just regenerated the lock file and pushed with no errors when it deployed, thanks!

@andordavoti
Copy link
Author

Seems to show up again out of the blue even after I've regenerated my pnpm lockfile, not sure how to debug this...

@andordavoti andordavoti reopened this Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants