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

Get the React.PropTypes.Object error when using "react": "^16.4.2", #25

Open
rsand111 opened this issue Sep 11, 2018 · 4 comments
Open

Comments

@rsand111
Copy link

rsand111 commented Sep 11, 2018

Trying to add react-here-maps library to a react app version 16.4.2, but getting the :
TypeError: Cannot read property 'object' of undefined
55 | }
56 | // define the context types that are passed down from a instance
57 | Circle.contextTypes = {

58 | map: React.PropTypes.object
59 | };
60 | Circle.defaultProps = {
61 | fillColor: "rgba(255, 255, 255, 0.5)",

I do believe that this is due to the 'prop-types' being moved to it's own library.
What are the chance of recompiling it with a more recent version of react ?
I try building the library myself, but the build failed with an error stating that it was looking for a apple enviroment.
Do you know of another more modern library ???

Regards
RS

@Anshr
Copy link

Anshr commented Sep 13, 2018

Same issue here.

@seanconrad1
Copy link

Also receiving the same issue

@quocthangit247
Copy link

i have a same issue.

@MonaAliIbrahim
Copy link

  1. npm install --save prop-types

  2. node_modules\react-here-maps\dist\Circle.js

    • adding
      var PropTypes = require('prop-types');
    • changing line 58
      Circle.contextTypes = { map: PropTypes.object };
  3. node_modules\react-here-maps\dist\Marker.js

    • adding
      var PropTypes = require('prop-types');
    • changing line 71
      Marker.contextTypes = { map: PropTypes.object };
  4. node_modules\react-here-maps\dist\HEREMap.js

    • adding
      var PropTypes = require('prop-types');
    • changing line 91
      HEREMap.childContextTypes = { map: PropTypes.object };

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

5 participants