-
Notifications
You must be signed in to change notification settings - Fork 100
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
ReferenceError: window is not defined #36
Comments
Hi, @vdhoangson! Could you describe some steps to reproduce the issue? Thanks. |
I have an article creation page When I click the link to this page, it works fine It only failed when I refreshed the page |
Please, describe the setup, how you load the component, etc. Without some details, it's impossible to reproduce it. |
aaa.js.zip |
anyone help me? |
We ask you about steps to reproduce. You attached some file instead. What could we do with it? We need more details (e.g. webpack configuration, node & npm version, etc.). Would be good if you create a repository with a minimal setup that allows reproducing the issue. |
@pomek can you add my skype? |
I guess you don't want to share with us your project. And I understand it. That's the reason why we're asking about steps and/or a minimal set-up for reproducing the issue. We're asking because as you said:
That's weird and it does not sound like an error of CKEditor itself. Answering your question - because you reported the issue here, we would like to help you here. If we resolve your problem, other developers could also resolve their issues in the future based on our messages. |
I using mern stack http://mern.io/ https://github.com/Hashnode/mern-starter And webpack config like this. Not edit anything I was installed ckeditor-react base on document, it work when i click a tag to go to editor page, but when i refresh editor page, it show error |
Before I go deeper into the details of MERN, I would like to ask you about the last thing - which version of React do you use? You can check this in |
thanks @pomek |
Ok, I've checked it (http://mern.io/documentation.html) and it looks like it's using server-side rendering (which we do not support as our editor directly touches the DOM) You need to use some dynamic require to check if the component is rendered by the browser or by the server. Related problems: |
The case described in the ticket is about missing |
I ran into this same issue when trying to use Next.js with Server-Side Rendering and CKEditor. Here's how I fixed it in case it helps anyone:
|
How to use this in functional component?? |
This worked for me using hooks
|
I have same problem in Next.js |
I am getting the same issue with React version 18 (server side rendering). Can anyone help me with that. |
How to fix it please?
The text was updated successfully, but these errors were encountered: