Renovate 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.
I think nx doesn't allow both and source and build as the same request, I updated the last line so I can build to its normal location and then move it to the required folder as a workaround.
NODE_ENV=production npm run nx -- build $1 --prod
mv -vf dist/apps/$1/.next $2/
mv -vf dist/apps/$1/package.json $2/package.json
Thanks. That solved it for me. I'll keep the issue open until @JamesHenry responds though. Might be a better workaround
Every now and then I get an error that the .next directory already exists. Seems like a vercel caching thing. @akash6190 you running into this too?
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