react-dc icon indicating copy to clipboard operation
react-dc copied to clipboard

Doesn't work with the newer react version 16.2.0

Open kuul13 opened this issue 7 years ago • 2 comments

I have installed react-dc in my project that uses "react": "^16.2.0", "react-dc": "^1.0.6", "react-dom": "^16.2.0"

It throws error "TypeError: Cannot convert null or undefined to object" in ./node_modules/react-dc/dist/module/mixins/color-mixin.js at the following location:

4 | const { arrayOf, func, number, string } = React.PropTypes;

Can the dependencies be updated to the latest?

kuul13 avatar Feb 07 '18 20:02 kuul13

The React.PropTypes has been removed see the React website React.PropTypes has moved into a different package since React v15.5. Please use the prop-types library instead.

So the mixins throw errors . You could use a earlier version.
But I'd like to contribute to this library as dc.js is great.

tzs34 avatar Mar 08 '18 10:03 tzs34

@kuul13 You should be able to work around your issue temporarily by updating npm to the latest version. Looks like yours can't handle multiple versions of a dependency yet – I have npm 6.0.1 on macOS and projects with dependencies like yours do compile. Using 5.x, it won't.

madbonkey avatar May 11 '18 22:05 madbonkey