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.

I usually like to do my research and spend a lot of time doing so before reaching out for help but I’m at a dead end. I must be having tunnel vision at this point but either way here goes.

I understand the reason for handling routes in Nest and routing them to Next but I’m actually looking for Next to handle anything not defined in Nest. I don’t know if this is the correct use case but here’s an example none the less.

In pages/, I create a file called index.tsx and in nest I add to the AppController a Get(‘’) and Render(‘Index’). This loads on localhost:3000. In this index.tsx file, I create a link to redirect the user to a new page called Profile (<Link>). Clicking on this link for Profile, it successfully routes the user however when I refresh, Nest kicks in and throws an error.

Is there a solution for this?

In conclusion, if I go to /asadd, a non existent route in Nest, I would like to see the Next 404 error page and not the Nest stack trace page.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:29 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
jgouxcommented, Jul 29, 2020

@kyle-mccarthy No sorry I was on another subject. I’ll try it this week and let you know. Thanks again for your patience.

1reaction
dayrimcommented, Jun 19, 2020

Any chance you can provide an example project for this ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Router - W3Schools
Create React App doesn't include page routing. React Router is the most popular solution. Add React Router. To add React Router in your...
Read more >
Web Quick Start - React Router: Declarative Routing for React.js
It's a popular tool that works really well with React Router. First, install create-react-app and make a new project with it. npx create-react-app...
Read more >
How To Handle Routing in React Apps with React Router
In React, routers help create and navigate between the different URLs that make up your web application. They allow your user to move ......
Read more >
Ultimate React Router v6 Guide
Nesting Routes in React Router is pretty simple. All you need to do is create a new component to store your nested Routes...
Read more >
ReactJS - Routing - Tutorialspoint
React router provides four components to manage navigation in React application. Router − Router is th top level component. It encloses the entire...
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