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 13 support?

See original GitHub issue

Module not found: Error: Can’t resolve ‘next/dist/next-server/lib/router-context’

Must be nice to have an implementation to mock useRouter of next/navigation

Issue Analytics

  • State:open
  • Created 10 months ago
  • Reactions:5
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Pikachewscommented, Nov 12, 2022

I get the same thing when trying to add MemoryRouterProvider as a storybook decorator, using nextjs 13.0.2, not using the new app infrastructure.

2reactions
with-heartcommented, Dec 6, 2022

I was able to resolve the issue @e-roy reported above in https://github.com/Soil-labs/eden-app-2-FrontEnd/pull/688#pullrequestreview-1207242476.

We had to move our decorators from decorator.tsx to the decorators export of preview.tsx.

We also needed to change the import to next-router-mock/MemoryRouterProvider/next-12 because it defaults to trying to load next-10. No idea why that is.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blog - Next.js 13
The app directory includes support for: Layouts: Easily share UI between routes while preserving state and avoiding expensive re-renders. Server ...
Read more >
Plans to support Next.js 13 - /app directory · Issue #2928
The problem Next JS just release their v13 publicly. As seen in their docs, emotion has not yet added support. Is there any...
Read more >
AWS Amplify Hosting announces support for Next.js 12 and ...
Today, AWS Amplify Hosting announces Next.js 12 and 13 support, including middleware, incremental static regeneration (ISR), and image ...
Read more >
Deploy Next.js 13 on Netlify Today
Netlify supports Next.js 13 today. You can update your site to Next 13 and it will work on Netlify right away. All the...
Read more >
iPhone 13 Pro
Get to know your iPhone 13 Pro. ... The front view of iPhone 13 Pro. The front camera is at the top center...
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