-
-
Notifications
You must be signed in to change notification settings - Fork 539
ReferenceError: document is not defined #1624
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
Comments
document not being defined makes me think you are running this on the server instead of the browser. Also strange that you are |
At this moment the component is on the client side, "use client", I don't understand the error, I have tried several methods but it always shows me the error |
The document would be defined if it were running on the client. So you may have something set up incorrectly in your application. Given blocknote is working for everyone else, it is likely an issue in your application |
I just deleted the .next folder to evaluate the error, deleting the project cache. |
See this for more information on |
And, did that resolve it? |
the error persists, I have deleted the entire component and put it as in the documentation
|
Sorry, but this is an issue of your application. I can't really help you further than this. If you do a |
I created a new page with the component. In server mode, I get the following error: ⨯ TypeError: createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/context-in-server-component |
On the client side I have the following error: Yjs was already imported. This breaks constructor checks and will lead to issues! - yjs/yjs#438
|
In BlockNoteEditor.ts I have seen that it is import * as Y from "yjs";, maybe this is the problem |
You are having issues with client vs. server components. This has nothing to do with BlockNote. You'll have to solve this for yourself |
I'm working on it, but I don't understand the Blocknote component. I only use it on the client side because it uses a library that breaks the constructor. |
I found 18 imports of the yjs module, does it look familiar to you? |
STOP MESSAGING ME |
This is a public thread, it is not directed only to you but to anyone who has knowledge of the subject, feel free to respond or simply skip, any response to the thread is appreciated |
I have been receiving constant console errors referring to this particular error:
The text was updated successfully, but these errors were encountered: