Skip to content
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

Breaks server side rendering #47

Open
samdturner opened this issue Mar 17, 2017 · 0 comments
Open

Breaks server side rendering #47

samdturner opened this issue Mar 17, 2017 · 0 comments

Comments

@samdturner
Copy link

We run a react app that uses server side rendering.

When we import react-ladda, we get the following error message. The error goes away when we comment out the line that imports react-ladda.

ERROR in SERVER PRERENDERING
Encountered error: "ReferenceError: document is not defined"

We have traced the issue back to the ladda package (required by react-ladda). The below file accesses the document directly, but the document is not defined in node.js (I would open an issue in Ladda directly, but it looks like issues have been disabled in that package.)

https://github.com/hakimel/Ladda/blob/e5fa9e7681334a47419a126bdcb6aaefd05424da/js/ladda.js

Has anyone else encountered this issue before and what approach do you recommend?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant