Skip to content
This repository has been archived by the owner on Jan 30, 2021. It is now read-only.

PropTypes problem #11

Open
FredGr opened this issue Dec 8, 2017 · 5 comments
Open

PropTypes problem #11

FredGr opened this issue Dec 8, 2017 · 5 comments

Comments

@FredGr
Copy link

FredGr commented Dec 8, 2017

I have this when I try to use react-heatmap 👍
×
TypeError: Cannot read property 'number' of undefined ./node_modules/react-heatmap/lib/ReactHeatmap.js
c:/Users/Covarians/Documents/aex-server/client/node_modules/react-heatmap/lib/ReactHeatmap.js:96
93 | })(_react.Component);
94 |
95 | ReactHeatmap.propTypes = {

96 | max: _react2['default'].PropTypes.number,
97 | data: _react2['default'].PropTypes.array,
98 | unit: _react2['default'].PropTypes.string
99 | };

Note : I commented the lines and it worked. But this is a temporary fix.

@williejay2009
Copy link

Version issue. I don't think react-heatmap support latest version of react (16). I had to downgrade my version to get it to work without commenting out code.

@jamesbarrett95
Copy link

Tried commenting those lines out however the same error persists, did you do anything else @FredGr ?

@pikislabis
Copy link

Same error here.

@kimberw
Copy link

kimberw commented Aug 18, 2018

Same error too

@brandonabajelo
Copy link

React 16+ has separated prop types into a separate package. The work around is to fork the repo, add import PropTypes from 'prop-types'; to the top, and install your fork in your project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants