question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Next.js error: "Source and destination must not be the same"

See original GitHub issue

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.
image

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.

image

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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
JamesHenrycommented, Jan 7, 2021

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

1reaction
JamesHenrycommented, Jan 10, 2021

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS Amplify React JS Next error Source and destination must ...
Can you try setting the version of NextJS to 11 or latest in your Live Packages under App Settings. Here are the instructions:...
Read more >
Rewrites - next.config.js
Rewrites act as a URL proxy and mask the destination path, making it appear the user hasn't changed their location on the site....
Read more >
Setting a custom build directory - next.config.js
Set a custom build directory to use instead of the default .next directory.
Read more >
next.config.js: Redirects
source is the incoming request path pattern. · destination is the path you want to route to. · permanent true or false -...
Read more >
module-not-found - Next.js
The module you're trying to import has a different casing ... Make sure the casing of the file is correct. ... Incorrect casing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found