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

Wall of errors when using in ES6 project #39

Open
sebastialonso opened this issue Mar 4, 2016 · 6 comments
Open

Wall of errors when using in ES6 project #39

sebastialonso opened this issue Mar 4, 2016 · 6 comments

Comments

@sebastialonso
Copy link

This looks like the simplest library for GoogleMaps, so I decided to try it.
Importing thins like this

import React, { Component } from 'react'
import ReactGoogleMaps, { Map, Marker, OverlayView } from 'react-googlemaps'
const GoogleMapsAPI = window.google.maps

class Example extends Component {
...

Also, I have the google maps script in index.html

<script src="http://maps.googleapis.com/maps/api/js"></script> <script src="bundle.js"></script>

But all I get is

ERROR in ./~/react-googlemaps/src/ReactMapComponents.js
Module not found: Error: Cannot resolve module 'react/lib/mapObject' in /home/seba/repos/test_applications/react-redux-cordova-boilerplate/node_modules/react-googlemaps/src
 @ ./~/react-googlemaps/src/ReactMapComponents.js 4:16-46

ERROR in ./~/react-googlemaps/src/ui/components/ReactMap.js
Module parse failed: /home/seba/repos/test_applications/react-redux-cordova-boilerplate/node_modules/react-googlemaps/src/ui/components/ReactMap.js Line 55: Unexpected token <
You may need an appropriate loader to handle this file type.
|     if (this.state.mapLifeCycleState !== MapLifeCycle.CREATING_HOLDER) {
|       map = (
|         <GoogleMapsMap
|           {...this.props}
|           ref="map"
 @ ./~/react-googlemaps/src/ui/ReactDefaultInjection.js 7:15-47

ERROR in ./~/react-googlemaps/src/ui/components/ReactOverlayView.js
Module parse failed: /home/seba/repos/test_applications/react-redux-cordova-boilerplate/node_modules/react-googlemaps/src/ui/components/ReactOverlayView.js Line 36: Unexpected token <
You may need an appropriate loader to handle this file type.
| 
|   React.render(
|     cloneWithProps(<div />, props),
|     this._containerElement
|   )
 @ ./~/react-googlemaps/src/ui/ReactDefaultInjection.js 8:23-63

ERROR in ./~/react-googlemaps/src/ui/components/ReactFrag.js
Module parse failed: /home/seba/repos/test_applications/react-redux-cordova-boilerplate/node_modules/react-googlemaps/src/ui/components/ReactFrag.js Line 24: Unexpected token <
You may need an appropriate loader to handle this file type.
| 
|     return (
|       <span>{children}</span>
|       );
|   }
 @ ./~/react-googlemaps/src/ui/ReactDefaultInjection.js 9:16-49

ERROR in ./~/react-googlemaps/src/ui/MapOption.js
Module not found: Error: Cannot resolve module 'react/lib/invariant' in /home/seba/repos/test_applications/react-redux-cordova-boilerplate/node_modules/react-googlemaps/src/ui
 @ ./~/react-googlemaps/src/ui/MapOption.js 3:16-46

ERROR in ./~/react-googlemaps/src/ui/MapEvent.js
Module not found: Error: Cannot resolve module 'react/lib/invariant' in /home/seba/repos/test_applications/react-redux-cordova-boilerplate/node_modules/react-googlemaps/src/ui
 @ ./~/react-googlemaps/src/ui/MapEvent.js 3:16-46

ERROR in ./~/react-googlemaps/src/GoogleMapsAPI.js
Module not found: Error: Cannot resolve module 'react/lib/invariant' in /home/seba/repos/test_applications/react-redux-cordova-boilerplate/node_modules/react-googlemaps/src
 @ ./~/react-googlemaps/src/GoogleMapsAPI.js 3:16-46

ERROR in ./~/react-googlemaps/src/ui/ReactMapComponent.js
Module not found: Error: Cannot resolve module 'react/lib/invariant' in /home/seba/repos/test_applications/react-redux-cordova-boilerplate/node_modules/react-googlemaps/src/ui
 @ ./~/react-googlemaps/src/ui/ReactMapComponent.js 4:16-46

ERROR in ./~/react-googlemaps/src/ui/ReactMapComponentMixin.js
Module not found: Error: Cannot resolve module 'react/lib/invariant' in /home/seba/repos/test_applications/react-redux-cordova-boilerplate/node_modules/react-googlemaps/src/ui
 @ ./~/react-googlemaps/src/ui/ReactMapComponentMixin.js 4:16-46

What's going on here?

UPDATE: exactly the same thing is happening with the examples repo. I'm starting to think it's not me messing things up

@jontonsoup
Copy link

also getting this error

@fleetofthemalden
Copy link

I'm getting the first error

@factoryhr
Copy link

+1

1 similar comment
@chappydboz
Copy link

+1

@dmitriid
Copy link

dmitriid commented Jun 30, 2016

Same here. Also see #37 #38

@dmitriid
Copy link

To anyone. Use petehunt/react-googlemaps or commit feb6e71 to get rid of these errors

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

6 participants