vercel / next-learn

Learn Next.js Starter Code
https://next-learn-dashboard.vercel.sh/
MIT License
3.68k stars 1.89k forks source link

Chapter 11: Error: ENOENT: no such file or directory, open '/vercel/path0/.next/server/app/index.rsc' #770

Open meiyizheng opened 3 months ago

meiyizheng commented 3 months ago

After I finished chapter 11, there was a deployment failure in Vercel, it said:

Traced Next.js server files in: 34.808ms Created all serverless functions in: 1.137s Collected static files (public/, static/, .next/static): 5.466ms Error: ENOENT: no such file or directory, open '/vercel/path0/.next/server/app/index.rsc'

wuyou91 commented 3 months ago

I have the same error, and it works after I delete the experimental ppr.

ndimoforaretas commented 3 months ago

I had the same issue too and thanks to this tip from @wuyou91 I succeeded to deploy the project on vercel.🚀

So basically, in the mean time, the solution is to remove the changes related to "Partial Prerendering" demonstrated in chapter 10.🤔

cheers🤗

PenumbraPL commented 3 months ago

https://nextjs.org/docs/app/api-reference/next-config-js/partial-prerendering

Partial Prerendering is available in next@canary

After doing : npm install next@canary it works without deleting experimental ppr entry.

wang-xinrong commented 3 months ago

error resolved by removing ppr from chapter 10. Thanks guys!

Lavdewangan1 commented 3 months ago

Thanks, it works after removing "Partial Prerendering", which makes sense as they told it's an experimental thing for now, but I think it should have been mentioned in the chapter as well that this error might occur.

Surya-Pratap-Singh-Git commented 2 months ago

facing same issue

YouHeDad commented 1 month ago

Still facing the issue.

Regarding the suggested workarounds:

  1. Removing ch. 10 still causes the same deploy failure.
  2. Canary doesn't install. (Some 50+ warnings & errors)