I think netlify deploys are static- so that won’t work with NextJS previews. For NextJS previews you need a server. I haven’t tried myself but in this example it shows deploying to Vercel— have you tried that?
May 16, 2020, 4:12 AM
Thanks, that's sounds plausible (unfortunately). Wasn't really looking to switch away from Netlify, though... But I will check it out!
May 16, 2020, 9:27 AM
Nope, getting the same 404 on Vercel...Maybe
can you tell us real quick, wether this is an Vercel vs. Netlify issue or must be sth. else?
May 16, 2020, 10:01 AM
Okay, solved! The problem was with the build command. I had
npm run build
, which was wrong.It needed to be
. Hope this helps somebody else! (Haven't tried on Netlify yet, but it's working for Vercel)