I’m working on a project with several standalone apps, all of which were built using Next’s Pages Router on NextJS version 13.
We use Vercel’s preview links for testing new deployments before they are released to staging and production.
Recently we moved one of the apps to NextJS version 14, which caused the preview link to stop working - it now resolves to a public deployment, rather than the unreleased preview.
After some investigation, it appears that NEXT_PUBLIC_APP_URL is no longer set correctly in the version 14 case. Downgrading the app back to version 13 fixes the issue and the preview link works as expected.
I’ve gone through the NextJS migration guide to no avail. If anyone has any suggestions, they’d be much appreciated.