react-native-circular-slider icon indicating copy to clipboard operation
react-native-circular-slider copied to clipboard

Undefined is not an object (evaluating '_react2.PropTypes.number')

Open iam1208 opened this issue 6 years ago • 6 comments

When I am running my app I am after adding circular slider getting this error

iam1208 avatar Jul 25 '18 06:07 iam1208

You have to add PropTypes library and import then into the files. React recently put prop-types into its own package.

ghost avatar Aug 22 '18 09:08 ghost

Can you explain what you mean by this @JohnCoronel, I'm also getting this error and not really sure where to go from here.

danstans avatar Oct 01 '18 07:10 danstans

@danstans see https://github.com/bartgryszko/react-native-circular-slider/pull/21. You can edit the src files and update the imports so propTypes is included

ghost avatar Oct 02 '18 01:10 ghost

still not solved

ImHamzaAnwer avatar Dec 18 '18 07:12 ImHamzaAnwer

I fixed it by getting the package using yarn add prop-types --dev

and then editing the src files CircularSlider.js and ClockFace.js to use import PropTypes from 'prop-types'; instead of the React imported PropTypes because they deprecated it in the newer releases. Hope this helps and I will make a PR to merge this in.

Thanks Afshawn

afshawnlotfi avatar Jul 19 '19 02:07 afshawnlotfi

can this slider be used while developing app using expo? if yes then how? because I'm facing this error https://github.com/bartgryszko/react-native-circular-slider/issues/46

iambilalriaz avatar Jul 07 '22 11:07 iambilalriaz