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 when using monorepo #528

Open
ShazadShiraz opened this issue Feb 24, 2023 · 2 comments
Open

Error: NextRouter was not mounted when using monorepo #528

ShazadShiraz opened this issue Feb 24, 2023 · 2 comments
Labels

Comments

@ShazadShiraz
Copy link

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

It is strongly recommended to fork CodeSandbox template https://codesandbox.io/s/next-redux-wrapper-demo-7n2t5 and create a reproducible case. It will greatly speed up debugging.

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 6]

Additional context

Add any other context about the problem here.

@colinparsonscom
Copy link

Unfortunately there's no detail here on the setup @ShazadShiraz was using here, but I'm running into the same error when using next-redux-wrapper in a monorepo!

@elapshynov
Copy link

elapshynov commented Apr 11, 2024

Using pnpm monorepo.
This error appears at build time for 404 page.
Using Next js pages router if that matters (with next/router/useRouter).

Having same issue after installing react-avatar-editor@13.0.2 package monorepo project (issue seems to be unrelated to that package).

Packages:

  • next@13.5.6
  • next-redux-wrapper@8.1.0
  • react-avatar-editor@13.0.2

P. S.
Used suggestion here https://stackoverflow.com/questions/76507276/how-can-i-fix-nextrouter-not-mounted-error-while-deploying-next-js-13-app-to-ver
And
Tried to move react-avatar-editor@13.0.2 package to the project's root package.json and it worked like a charm. Hope it will help somebody else.

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

No branches or pull requests

3 participants