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

× TypeError: Cannot read property 'func' of undefined #30

Open
luli-isa opened this issue Oct 6, 2017 · 3 comments
Open

× TypeError: Cannot read property 'func' of undefined #30

luli-isa opened this issue Oct 6, 2017 · 3 comments

Comments

@luli-isa
Copy link

luli-isa commented Oct 6, 2017

I try integrate react-d3-map on my react project. I installed package using npm

npm install --save react-d3-map

And import on my React component

var Map = require('react-d3-map').Map;
var PolygonGroup = require('react-d3-map').PolygonGroup;

When I try to use Map components, I have the following error:
× TypeError: Cannot read property 'func' of undefined
(anonymous function)
node_modules/react-d3-map/lib/map.js:139

, {
    key: 'childContextTypes',
    value: {
      geoPath: _react2['default'].PropTypes.func.isRequired,
      projection: _react2['default'].PropTypes.func.isRequired
    },
    enumerable: true
@chrisjbrown
Copy link

chrisjbrown commented Oct 19, 2017

+1 same

seems to be missing in docs

@aldofunes
Copy link

Apparently it has to do with the React version react-d3 is using. A solution may be to use prop-types npm module instead

@jimnoss
Copy link

jimnoss commented Feb 27, 2018

Use the latest 3.x version of react-router (3.2.0). This is working.
npm i [email protected]

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