-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
Server rendering breaks #2013
Comments
Getting this error too with the latest release, hash that introduced this |
Any idea on how to fix it? |
Hard to say without having the context of was the issue, but reverting to |
@mimcabrera @mgibeau Odd that |
Still getting this error but in a different place (overlay.jsx).... Please guys don't close the issue if your are not sure it's solved and merged. You just confuse people |
@izziaraffaele Is this the same error? If not, could you open a new issue with the log so that we can have a look. Thank. |
The issue is always the same... you use document in componentWillMount which brakes server side rendering since the DOM is not available on server side. in overlay.jsx
|
I see, this is not from the master branch. See https://github.com/callemall/material-ui/blob/master/src/overlay.jsx#L57. |
Exactly what I meant... I did npm installl from scratch, got the error "document not defined", found the problem on componentWillMount, I came here to report the issue but I saw you already solved the problem and close the issue. Remember that what people get is this https://github.com/callemall/material-ui/blob/v0.13.1/src/overlay.jsx, so even if you fix the issue keep it open till you'll merge those changes in the npm package. |
@izziaraffaele I see your point. Well, It's a matter of convention. Do we close an issue once it's merged to master or once it's released? IMO we should do it once it's merged to master. |
Sorry for that. @shaurya947 Can we do a hotfix release? |
How many people are using your master branch? how many popole are using your stable release instead? For how many people this is still an issue? It doesn't matter if you solve it in the master branch, in you local machine or in the branch XYZ... Is it an issue for most people using your package? Then it should stay open... |
@izziaraffaele I disagree. I'm following the same convention as facebook with react. For instance facebook/react#5337. |
@oliviertassinari not sure if it's a "convention" or it's just what they did in that case ( BTW it's a feature not a bug ;) ). I would like to read some more info about it if you have others. Anyways it's up to you.... I just think that the other approach lead to lot less questions, duplicated issues and headache for people using your package. |
@izziaraffaele Alright, since it's not released and people keep opening issue for this, I'm reoponing the issue until we release the fix. (I can't) |
@oliviertassinari Let's keep this issue open. We should release early next week and then we can close this. |
Hi guys, the fix for this issue is to move it on
|
HI guys, I came across the same issue while trying the framework. +1 to solve this one asap. |
Releasing soon, should fix this.. |
The fix was release with v0.13.2. |
In my code I added
import {DatePicker} from 'material-ui';
Then i've got error
ReferenceError: document is not defined
at [object Object].componentWillMount (~/node_modules/material-ui/lib/overlay.js:64:34)
I also change my import to
const DatePicker = require('material-ui/lib/date-picker/date-picker');
Still no luck
The text was updated successfully, but these errors were encountered: