I have a Next.js standalone application with output: "standalone" configured in the next.config.js file. When I deploy it on Vercel, everything works perfectly. However, when deploying it on Netlify, I encounter a “Page Not Found” error.
The generated build does not include an index.html file since it’s a standalone app. While it functions on Vercel, it doesn’t work on Netlify. I need help publishing my Next.js site on Netlify.
The thing is the same code work like a charm when I deploy it on vercel without any additional step but not here if there’s any issue with my code it shouldn’t have worked on vercel either.
Why are you using a standalone output in the first place?
In any case, your first deploy did not have the Next.js plugin added which is why it’s not working. Based on your config, you’ve now added the plugin but you’re running next start, so the build never finishes. Your site is still serving the broken version.
My site is configured with output: standalone because I’m using generateStaticParams on several pages. When I attempt to build the app with output: export, I encounter the following error:
@hrishikesh, the default build method isn’t working for my project check SS. My app is configured with output: standalone, as it’s the only way it functions correctly. The build completes successfully and works locally, and it also deploys without any issues on Vercel.
Why can’t I use the standalone output on Netlify? If it’s possible, please provide clear instructions on how to set it up.