mauron85 / cordova-plugin-background-geolocation-example

51 stars 54 forks source link

Fails to build fresh install #11

Closed grassick closed 6 years ago

grassick commented 6 years ago

Cloned fresh from github with latest npm, cordova installed. Ran npm install; npm run build

It seems to have trouble compiling the es6 code (e.g. static and =>, etc)

ERROR in ./node_modules/react-navigation/src/views/TabView/TabView.js
Module parse failed: Unexpected token (10:22)
You may need an appropriate loader to handle this file type.
| 
| class TabView extends React.PureComponent {
|   static defaultProps = {
|     lazy: true,
|     removedClippedSubviews: true,
 @ ./node_modules/react-navigation/src/react-navigation.js 84:11-45
 @ ./src/BrowserNavigator.js
 @ ./src/CordovaApp.js
 @ multi babel-polyfill ./src/CordovaApp.js

ERROR in ./node_modules/react-navigation/src/navigators/SwitchNavigator.js
Module parse failed: Unexpected token (11:13)
You may need an appropriate loader to handle this file type.
| 
|   const navigator = createNavigator(router, routeConfigMap, switchConfig)(
|     props => <SwitchView {...props} />
|   );
| 
 @ ./node_modules/react-navigation/src/react-navigation.js 26:11-50
 @ ./src/BrowserNavigator.js
 @ ./src/CordovaApp.js
 @ multi babel-polyfill ./src/CordovaApp.js
mauron85 commented 6 years ago

Can confirm. I guess it's because react-navigation did change since ^1.0.0-beta.19 which is version declared in package.json. Until resolved, you can try to explicitly install that version by updating package.json or by:

npm i react-navigation@1.0.0-beta.19
gagan-bansal commented 6 years ago

Thanks @mauron85 It worked.

mauron85 commented 6 years ago

fixed. thanks for reporting