Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: NextRouter was not mounted. Storybook 7.0.9, NextJS 13.1.4 #144

Open
dacgray opened this issue May 9, 2023 · 1 comment
Open

Comments

@dacgray
Copy link

dacgray commented May 9, 2023

We set up storybook with these instructions: https://storybook.js.org/blog/get-started-with-storybook-and-next-js/

In these versions we set router parameters with:

const parameters = {
    nextjs: {
        router: {
            route: '/my-route',
            path: '/my-route',
            asPath: '/my-route',
            locale: 'en-GB',
        },
    },
}

const getStory = (handler: FooHandler): Story => {
    return {
        parameters,
        ...

We get Error: NextRouter was not mounted

router.js:121

@corymsmith
Copy link

Any ideas on how to resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants