-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Feature: use LexicalCollaborationPlugin in nextjs #2696
Comments
I have create a custom component with no ssr dynamic import. It can resolve the problem |
With dynamic import, the project based on nextjs can send yjs msg to project based on vite which in offical playground. But the project based on nextjs still can't apply yjs msg. |
@cqh963852 |
I'm getting the following stacktrace when using this solution with nextjs and vercel deployment:
Has anyone else encountered this? |
I have meet problem like this. But not on lexical. Due to there is no opportunity for initialization in decentralized collaboration. The document must start from empty. If the initialization part is added, the collaboration will be repeated with the initialization and conflicts will occur. My solution to this problem is to use a centralized initialization method. While connect to the server, yjs sync document from server. Synchronization at this time can be regarded as an initialization action |
I managed to upload sourcemaps for a more readable error:
it clearly still is a result of the CollaborationPlugin :/ |
I am using nextjs with LexicalCollaborationPlugin.
But it will said WebSocket is not defined. It is related to ssr.
I tried mount the plugin at client side. It will said
Hydration failed because the initial UI does not match what was rendered on the server.
Is there any way I can use CollaborationPlugin on nextjs?
The text was updated successfully, but these errors were encountered: