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

Can't use it with Browserify and an isomorphic React app #62

Closed
DWboutin opened this issue Aug 12, 2016 · 5 comments
Closed

Can't use it with Browserify and an isomorphic React app #62

DWboutin opened this issue Aug 12, 2016 · 5 comments

Comments

@DWboutin
Copy link

It give me this error

var doc = document
  ^

  ReferenceError: document is not defined
at /Users/mboutin2/working-directory/project/node_modules/scriptjs/dist/script.js:12:13
at doc (/Users/mboutin2/working-directory/project/node_modules/scriptjs/dist/script.js:8:72)
at Object.<anonymous> (/Users/mboutin2/working-directory/project/node_modules/scriptjs/dist/script.js:11:3)
at Module._compile (module.js:413:34)
at Module._extensions..js (module.js:422:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/mboutin2/working-directory/project/node_modules/babel-register/lib/node.js:166:7)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/mboutin2/working-directory/project/node_modules/react-google-charts/lib/components/GoogleChartLoader.js:16:17)
at Module._compile (module.js:413:34)
at Module._extensions..js (module.js:422:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/mboutin2/working-directory/project/node_modules/babel-register/lib/node.js:166:7)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)```
@rakannimer
Copy link
Owner

Hey, yes this a known limitation for now : https://github.com/RakanNimer/react-google-charts#isomorphic-support. PRs are welcome!

@DWboutin
Copy link
Author

Great, i'll check what i can do!

@voogryk
Copy link

voogryk commented Aug 31, 2016

I fix it and create PR #65 Enjoy!)

@rakannimer
Copy link
Owner

Merged #65 should be fixed.

@nicholasalanbrown
Copy link

I want to use this package to create chart images on my server with Phantom.js. I have everything working server side except when I try and run ReactDOMServer.renderToString()' I just get '"creating chart...". How would I wait until the chart is ready on the server before working with its HTML?

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

4 participants