Skip to content

Rendering a component on the server requires DOM (document) #524

@wereHamster

Description

@wereHamster

I have the following stack trace when I try to render one of my pages on the server:

ERROR in ReferenceError: document is not defined
    at createNode (static:3586:163)
    at idiff (static:3627:26)
    at diff (static:3602:20)
    at renderComponent (static:3771:33)
    at renderComponent (static:3762:26)
    at cl.extend.forceUpdate (static:3917:14)
    at static:55402:16
    at Object.sig.subscribe (static:55288:10)
    at cl.React.createClass.componentWillMount (static:55401:21)
    at Object.renderToString (static:4546:34)

Somehow a code path is taken which causes a crash due to non-existing document in the global scope. I tried to follow the code in renderComponent but didn't get far.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions