vercel / next-learn

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

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

Open meiyizheng opened 4 months ago

meiyizheng commented 4 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 4 months ago

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

ndimoforaretas commented 4 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 4 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 4 months ago

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

Lavdewangan1 commented 4 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 3 months ago

facing same issue

YouHeDad commented 3 months 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)