experience-experiments / react-easy-chart

[DEPRECATED] - Easy to use React Charting library
http://experience-experiments.github.io/react-easy-chart
BSD 3-Clause "New" or "Revised" License
142 stars 55 forks source link

Issue on React 16/ Compatibility with React 16 #106

Closed iamcaleberic closed 6 years ago

iamcaleberic commented 6 years ago

So on React 16 I am getting an error:

Uncaught TypeError: Cannot read property 'object' of undefined originating from this library

Matthew-Burfield commented 6 years ago

I'm getting this same issue. This is what I'm seeing in my browser

TypeError: Cannot read property 'object' of undefined
./node_modules/radium/lib/components/style.js
node_modules/radium/lib/components/style.js:93
  90 | 
  91 |   return Style;
  92 | }(_react.PureComponent), _class.propTypes = {
> 93 |   radiumConfig: _react.PropTypes.object,
  94 |   rules: _react.PropTypes.object,
  95 |   scopeSelector: _react.PropTypes.string
  96 | }, _class.contextTypes = {
sat- commented 6 years ago

Hi, the react-easy-chart has just been updated to use the new prop-types module so can you please check if you still get this issue with version 0.3.0?

aberba commented 6 years ago

Yes. I still get wannings

npm WARN radium@0.19.4 requires a peer of react@^15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-easy-chart@0.3.0 requires a peer of d3-array@^0.8.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-easy-chart@0.3.0 requires a peer of d3-scale@^0.9.3 but none is installed. You must install peer dependencies yourself.
npm WARN react-easy-chart@0.3.0 requires a peer of d3-shape@^0.7.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-easy-chart@0.3.0 requires a peer of prop-types@^15.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-easy-chart@0.3.0 requires a peer of react@^15.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-easy-chart@0.3.0 requires a peer of react-dom@^15.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-easy-chart@0.3.0 requires a peer of react-faux-dom@^2.5.0 but none is installed. You 
...
iamcaleberic commented 6 years ago

@aberba just make sure you have d3-array, d3-scale , d3-shape, prop-types, react-dom, react-faux dom, radium, react are installed or exist in the package.json file. if so dont worry about the warnings if the packages exist.

ineil commented 6 years ago

@iamcaleberic I have just attempted to upgrade our codebase to React 16. We're getting the same type error even after I yarn added the above dependencies to our package.json. I tried deleting node_modules and reinstalling/upgrading everything. Still no joy.

iamcaleberic commented 6 years ago

@ineil I tracked the error to radium which is a dependency to this library ....if your codebase really depends on this library and you want to update to react 16...I would say its not ready yet...I had to switch to the uber vis for the time being charting library to be able to bump up to react 16...If you cant switch the library I would advise sticking to react 15.5 and below...I will assist where I can in updating this library to be compatible with react 16.