Next.js error: "Source and destination must not be the same"
See original GitHub issueRenovate bot opened a PR to upgrade from 11.0.18 to 11.0.20 and my nextjs build failed with error
Source and destination must not be the same.

I am using @JamesHenry’s build-nextjs-app-on-vercel.sh script. The entire next build completes on vercel, but then when it is meant to create the serverless functions on the edges, it throws the above error.

This is most likely relate to https://github.com/serverless-nextjs/serverless-next.js/issues/461
Everything works fine on 11.0.18. I am simply not going to merge that PR in, and keep going until this is solved. I just figured I’d point it out.
PS. I know, I should use nx migrate
and not manually update deps, which is exactly what I do when I see a nx related PR from renovate
. I ran that and there was no migrations.json
file this time around and no other packages other than those listed above got updated with it, so it’s essentially the same PR this time around.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6
The combination of some updates on the Vercel side and this PR: https://github.com/nrwl/nx/pull/4459 will mean that the extra build script should no longer be required and the Vercel UI setup can be simplified.
We have a thread going with Vercel on this, and I will update the instructions as soon as we have confirmation on all sides
I would say just hang tight on whatever works for you in the interim
Hi folks 👋
We have worked together with Vercel to improve the configuration required to deploy Next.js apps on Vercel from Nx workspaces. Additional/custom scripts are no longer required.
Please see the updated guidance here https://github.com/nrwl/nx/pull/4483, it is available for you to implement immediately.
Once the PR is merged, the updated guidance will also be available on https://nx.dev/latest/react/guides/nextjs
Thanks!