Open customer-tfp opened 1 year ago
We are also having similar issue and as a quick fix we just removed notFound from our getStaticProps. It seems to break when we have that props returned from getStaticProps. Hope to get actual fix soon since we we notFound extensively in our applications.
We are also experiencing this issue on our production servers which are preventing builds.
Same error response after build completes: Error: ENOENT: no such file or directory, open '/vercel/path0/.next/server/pages/404.html
We were able to remove the usage of notFound in our getStaticProps and that worked!
However our other nextjs instances use the notFound attribute a lot and so we are blocked
Same thing happened to me;
Looks like issue starts to happen with Vercel CLI 31.2.1
Also, I noticed the issue wasn't there back in Vercel CLI 31.0.4 - Not sure if its related to i18n + 404 page PR#10243?
Update: The issue was reproducible locally with both Vercel CLI versions above and Removing notFound
from getStaticProps
fixes the issue as per @joshmu mentioned above worked.
I'm facing the same issue. For now, I just stopped using the 404 page as a fallback but that's not a fix. Does anyone have an alternative solution/fix/workaround?
Same problem here. I use standalone output with app router, I don't have /pages directory. when I run npm run build
it returns the following
`○ / 2.17 kB 173 kB
├ ○ /_not-found 0 B 0 B
├ ○ /infos 1.73 kB 95.9 kB
└ λ /picture/[link] 666 B 101 kB
Route (pages) Size First Load JS ─ ○ /404 182 B 76.5 kB
Can also replicate on 13.4.20-canary.10
. Started occuring after 13.4.20-canary.3
. I have all my error pages in an (errorpages)
folder within the app router. Deleting them is the only way around it for me currently.
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
Can't link the project but I can shared package.json
To Reproduce
Custom 404.js added Node 16 and 18 used both gives the same error React 17 Next 12.2
Describe the Bug
This bug happens at the end of the build process during deployment on vercel, projects build but deployment fails due to 404.html not found error
Expected Behavior
I did not change anything important on package.json or next-config.js or vercel project settings but recently this error started to occur on my projects that has 404.js as a custom 404 page.
Which browser are you using? (if relevant)
any
How are you deploying your application? (if relevant)
Vercel