You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After performing the JSS 21.x to 22.1 upgrade, we encountered an error that reads "NextRouter was not mounted" and after reading the logs it is coming from the RichText component in sitecore-jss-nextjs. I've read in the Next.JS documentation that this is happening only if we are using next/router on an app application; we are using pages.
However if this would help, we are also using turborepo for our jss solution.
To Reproduce
Perform JSS upgrade from 21.1.6 to 22.1.0 in succession as described in the documentation
Expected Behavior
useRouter from next/router should not have been an issue because the Next.js application is not running on app version of Next.js
Possible Fix
No response
Provide environment information
Sitecore Version: XM Cloud
JSS Version: 22.1.0
Browser Name and version: Edge
Operating System and version (desktop or mobile): Windows 11
The text was updated successfully, but these errors were encountered:
We encountered the same error during our upgrade and found the same thing in our SSG/ISR application using page router. We initially wrapped our use of the RichText component in a NoSsr component to make it only render on the client, not the server. However, as we updated next and jss further, to later versions, we found we didn't need that any more and it was just working as expected.
What version of next are you using? We're on latest next v14 and latest jss v22.
Describe the Bug
After performing the JSS 21.x to 22.1 upgrade, we encountered an error that reads "NextRouter was not mounted" and after reading the logs it is coming from the RichText component in sitecore-jss-nextjs. I've read in the Next.JS documentation that this is happening only if we are using
next/router
on anapp
application; we are usingpages
.However if this would help, we are also using turborepo for our jss solution.
To Reproduce
Perform JSS upgrade from 21.1.6 to 22.1.0 in succession as described in the documentation
Expected Behavior
useRouter
fromnext/router
should not have been an issue because the Next.js application is not running onapp
version of Next.jsPossible Fix
No response
Provide environment information
The text was updated successfully, but these errors were encountered: