Closed MKlblangenois closed 1 year ago
This issue has been labeled as a bug since it was created using the 🚨 Bug Report Template.
Hi there, thank you so much for the report!
Following our Maintenance Process, we will review your bug report and get back to you next Wednesday. To ensure a smooth review of your issue and avoid unnecessary delays, please make sure your issue includes the following:
package.json
file.If you have identified the cause of the bug described in your report and know how to fix it, you're more than welcome to open a pull request address it. Check out our quick start guide for a simple contribution process.
If you think your issue is a question (not a bug) and would like quicker support, please close this issue and forward it to an appropriate section on our community forum: https://community.prismic.io
- The Prismic Open-Source Team
Hi @MKlblangenois, thanks for the report!
@prismicio/next
does not support Next.js's beta app
directory at this time. We are waiting for the feature to stabilize before supporting it since it will require significant changes to the package.
You can find more details about this decision here: https://github.com/prismicio/prismic-next/pull/48#issuecomment-1316270169
Since that comment was written, Next.js's app
directory feature has improved, but we prefer waiting until it is more mature.
If you have any questions, please let us know! 🙂
Versions
@prismicio/next
: v1.0.2next
: v13.1.1node
: v16.14.0Reproduction
When I'm trying to add
<PrismicPreview />
inside my page, I got an error from NextJSAdditional Details
Code used : ```tsx // ./app/layout.tsx "use client"; import { PrismicProvider } from "@prismicio/react"; import Link from "next/link"; interface RootLayoutProps { children: React.ReactNode; } const RootLayout: React.FC
Hello world!
What is actually happening?
Got an error from NextJS :
Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
.Possible way to fix that
When I look to vercel/next.js#43585, It seems like replace
next/router
bynext/navigation
(used insidePrismicPreview.tsx
on line :58 foruseRouter
) can solve this issue.