Next.js Discord

Discord Forum

Prevent "PageNotFoundError" in hybrid Rails/Next.js application

Unanswered
Red harvester ant posted this in #help-forum
Open in Discord
Red harvester antOP
We're using a hybrid rails/next.js setup and slowly but surely moving our application to Next.js. I've recently been experimenting with upgrading from Next 12 to 14 and am seeing PageNotFoundError show up in my terminal.

Some of our pages are being served by rails, some are being served by Next. I don't expect Next to be able to find the page because it doesn't exist in Next.js. With that said, this error comes up if I click on the link to a Rails-served page.
PageNotFoundError: Cannot find module for page: route not found /team/workload/projects
[0]     at Object.ensurePage

FWIW, we're only using the /pages directory for now.

Is there a way to quiet this error (aside from finishing the migration 😄)?

0 Replies