NextJS - TipTap breaks Next router
See original GitHub issueWhat’s the bug you are facing?
When I navigate to ‘/’ with the nextJS link component from a page where I render the editor I get the following error:
NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
How can we reproduce the bug on our side?
Create a React component in NextJS following this tutorial: https://tiptap.dev/installation/nextjs then create a route in Next like /blog/create where you render the editor then create a link to ‘/’ and you will get the following error: NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
Can you provide a CodeSandbox?
No response
What did you expect to happen?
I expect to navigate away from any page where the editor is rendered without any errors
Anything to add? (optional)
No response
Did you update your dependencies?
- Yes, I’ve updated my dependencies to use the latest version of all packages.
Are you sponsoring us?
- Yes, I’m a sponsor. 💖
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
next/router | Next.js
Learn more about the API of the Next.js Router, and access the router instance in your page with the useRouter hook.
Read more >Next.js WYSIWYG – Tiptap Editor
The following guide describes how to integrate Tiptap with your Next.js project. #Requirements. Node installed on your machine; Experience with React. #1.
Read more >React Tiptap Collaboration plugin and connecting to an ...
After I make the first change, while using hot reloads in VSC or Code Sandbox, it break because it tries to create a...
Read more >React-admin - Upgrading to v4 - Marmelab
If your code used useSelector to read the react-admin application state, it will break. React-admin v4 doesn't use Redux anymore. React-admin no longer...
Read more >Ano mas maganda? lagyan ko nang redux yung next.js app or ...
Currently using react-query, have nice integration specially with nextjs ... but I am eager to break into the tech industry and I never...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @rgbskills, thanks for your bug report. Could you give more information? (For example what kind of marks or nodes are used?
I tried to replicate the bug with a super simple editor but it worked just fine. (See video)
https://user-images.githubusercontent.com/6538827/163281870-863e3567-088d-478b-93eb-28ae068b6371.mp4
I was facing an error which said something like ‘failed to remove a node’ when going back (previous page). Fixed it by adding a parent div element to all the children html tag.