After installing geolocations there are errors


#1

Hi so I’m woking on a project that needs to use geolocations and after I installed the geolocations (I used the exact steps that was provided in the documentations) but I’m getting this error when I try to build the app on the iOS platform and here is the error :

[21:29:50]  typescript: node_modules/@ionic-native/geolocation/index.d.ts, line: 1 
            Module '"/Users/mr3bood/Desktop/dev/myApp-master/node_modules/@ionic-native/core/index"' has no exported 
            member 'IonicNativePlugin'. 

       L1:  import { IonicNativePlugin } from '@ionic-native/core';
       L2:  import { Observable } from 'rxjs/Observable';

[21:29:50]  ionic-app-script task: "build" 
[21:29:50]  Error: Failed to transpile program 
Error: Failed to transpile program
    at new BuildError (/Users/mr3bood/Desktop/dev/myApp-master/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at /Users/mr3bood/Desktop/dev/myApp-master/node_modules/@ionic/app-scripts/dist/transpile.js:102:20
    at transpileWorker (/Users/mr3bood/Desktop/dev/myApp-master/node_modules/@ionic/app-scripts/dist/transpile.js:68:12)
    at Object.transpile (/Users/mr3bood/Desktop/dev/myApp-master/node_modules/@ionic/app-scripts/dist/transpile.js:26:12)
    at buildProject (/Users/mr3bood/Desktop/dev/myApp-master/node_modules/@ionic/app-scripts/dist/build.js:98:78)
    at /Users/mr3bood/Desktop/dev/myApp-master/node_modules/@ionic/app-scripts/dist/build.js:46:16
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ionic-hello-world@ ionic:build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ionic-hello-world@ ionic:build script 'ionic-app-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mr3bood/.npm/_logs/2017-04-29T18_29_50_375Z-debug.log

#2

Could you please output your package.json contents here?


#3
{
  "name": "ionic-hello-world",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "4.0.0",
    "@angular/compiler": "4.0.0",
    "@angular/compiler-cli": "4.0.0",
    "@angular/core": "4.0.0",
    "@angular/forms": "4.0.0",
    "@angular/http": "4.0.0",
    "@angular/platform-browser": "4.0.0",
    "@angular/platform-browser-dynamic": "4.0.0",
    "@ionic-native/core": "3.4.2",
    "@ionic-native/geolocation": "^3.6.1",
    "@ionic-native/splash-screen": "3.4.2",
    "@ionic-native/status-bar": "3.4.2",
    "@ionic/storage": "2.0.1",
    "angular2-google-maps": "^0.17.0",
    "ionic-angular": "3.0.1",
    "ionicons": "3.0.0",
    "rxjs": "5.1.1",
    "sw-toolbox": "3.4.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.3.0",
    "typescript": "~2.2.1"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-console",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [],
  "description": "My App: An Ionic project"
}

#4

I think you should up your ionic-native/core to at least 3.6.0 . This is probably due to a mismatch in versions (plugin you installed is way newer then your core version). Change the version accordingly in your package.json, remove your node_modules and run npm install again. Let me know if it worked out.