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

Document is not defined error #26

Closed
super-cache-money opened this issue Dec 29, 2015 · 7 comments
Closed

Document is not defined error #26

super-cache-money opened this issue Dec 29, 2015 · 7 comments

Comments

@super-cache-money
Copy link

I'm getting the following error:

ReferenceError: document is not defined
[1]     at /my/project/node_modules/scriptjs/dist/script.js:12:13
[1]     at doc (/my/project/node_modules/scriptjs/dist/script.js:8:72)

In case you need some context, I'm using it within this boilerplate.

Evidently something is wrong because document is not defined on the server. Is this scriptjs's fault? Any quick fixes?

@rakannimer
Copy link
Owner

Looks like it's the latest's release's problem. You can use version 0.1.9 which depends on jQuery for a quick fix while I find the time to check it out ! Should be easy to fix.

npm uninstall react-google-charts
npm install react-google-charts@0.1.9

Thanks for reporting,
Cheers

@dmmalam
Copy link

dmmalam commented Feb 25, 2016

+1

@olalonde
Copy link

olalonde commented Apr 6, 2016

Temporary fix which should work with https://github.com/erikras/react-redux-universal-hot-example:

const Chart = __CLIENT__ ? require('react-google-charts').Chart : null

@rakannimer
Copy link
Owner

Thanks for reporting !
Should be fixed in 1.0.0
Let me know if it still breaks

@mychaelgo
Copy link

@rakannimer still breaks in 1.0.0

@tiagovdot
Copy link

@rakannimer having the same issue with 1.0.2

@justinbc820
Copy link

justinbc820 commented Jul 13, 2016

@rakannimer This issue needs to be reopened. I'm having this issue with 1.0.2. Also, when I tried to revert back to 0.1.9, I then get the "rendering with a blank div" issue#32

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

7 participants