transistorsoft / cordova-background-geolocation-SampleApp

Cordova Background Geolocation Sample Application
https://www.transistorsoft.com/shop/products/cordova-background-geolocation
MIT License
122 stars 78 forks source link

android prepare fails on clean try #114

Closed PhilGauths closed 5 years ago

PhilGauths commented 5 years ago

I follow instruction to compile from scratch and always have this error

ionic cordova prepare android

ionic-app-scripts.cmd build --target cordova --platform android [10:23:39] ionic-app-scripts 3.2.4 [10:23:39] build dev started ... [10:23:39] clean started ... [10:23:39] clean finished in 4 ms [10:23:39] copy started ... [10:23:39] deeplinks started ... [10:23:39] deeplinks finished in 241 ms [10:23:39] transpile started ... [10:23:44] typescript: ...und-geolocation-SampleApp/node_modules/@ionic-native/core/decorators/common.d.ts, line: 10 Cannot find name 'unknown'.

   L9:  export declare function wrapPromise(pluginObj: any, methodName: string, args: any[], opts?: CordovaOptions): Promise<unknown>;
  L11:   * Checks if plugin/cordova is available

[10:23:44] ionic-app-script task: "build" [10:23:44] Error: Failed to transpile program Error: Failed to transpile program at new BuildError (C:\Users\JPhil\Documents\towsoft\try ionic\cordova-background-geolocation-SampleApp\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28) at C:\Users\JPhil\Documents\towsoft\try ionic\cordova-background-geolocation-SampleApp\node_modules\@ionic\app-scripts\dist\transpile.js:159:20 at new Promise () at transpileWorker (C:\Users\JPhil\Documents\towsoft\try ionic\cordova-background-geolocation-SampleApp\node_modules\@ionic\app-scripts\dist\transpile.js:107:12) at Object.transpile (C:\Users\JPhil\Documents\towsoft\try ionic\cordova-background-geolocation-SampleApp\node_modules\@ionic\app-scripts\dist\transpile.js:64:12) at C:\Users\JPhil\Documents\towsoft\try ionic\cordova-background-geolocation-SampleApp\node_modules\@ionic\app-scripts\dist\build.js:109:82 [ERROR] An error occurred while running subprocess ionic-app-scripts.

    ionic-app-scripts.cmd build --target cordova --platform android exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.

any help will be appreciate

christocracy commented 5 years ago

In the cloned repo, edit package.json

  "devDependencies": {
       "@ionic/app-scripts": "3.2.2",
       "opn": "^5.1.0",
+      "typescript": "3.6.2"
  }
rm -rf node_modules
npm install

Try again

PhilGauths commented 5 years ago

thanks, this solve the problem