Can't build package

Hello, after following the documentation from the Ionic Pro section I get the following typescript errors when trying to run ionic cordova run android:

[18:39:27]  typescript: ...op/Ulises/Ionic/PlantillaIonic/node_modules/@ionic/pro/dist/src/definitions.d.ts, line: 1
            Cannot find type definition file for 'cordova-plugin-ionic'.

       L1:  import { Monitoring } from './services/monitoring';
       L2:  import { Api } from './api';

[18:39:27]  typescript: ...op/Ulises/Ionic/PlantillaIonic/node_modules/@ionic/pro/dist/src/definitions.d.ts, line: 33
            Cannot find name 'IDeployPluginAPI'.

      L32:  deploy: IDeployPluginAPI;
      L33:  getFramework(): string;
      L34:  getAppId(): string;

[18:39:27]  typescript: ...op/Ulises/Ionic/PlantillaIonic/node_modules/@ionic/pro/dist/src/definitions.d.ts, line: 36
            Property 'IonicCordova' does not exist on type 'Window'.

      L35:  getPlugin(): Promise<Window['IonicCordova']>;
        6:  getSnapshotId(): Promise<string>;
      L37:  getChannel(): Promise<string>;

[18:39:27]  typescript: .../Desktop/Ulises/Ionic/PlantillaIonic/node_modules/@ionic/pro/dist/src/index.d.ts, line: 1
            Cannot find type definition file for 'cordova-plugin-ionic'.

            export * from './definitions';
       L2:  import { Api } from './api';

[18:39:27]  typescript: .../Desktop/Ulises/Ionic/PlantillaIonic/node_modules/@ionic/pro/dist/src/index.d.ts, line: 34
            Cannot find name 'IDeployPluginAPI'.

      L33:  readonly deploy: IDeployPluginAPI;
      L35:   * Interact with Ionic Monitoring using these functions.

[18:39:27]  typescript: .../Desktop/Ulises/Ionic/PlantillaIonic/node_modules/@ionic/pro/dist/src/index.d.ts, line: 41
            Cannot find name 'IDeployPluginAPI'.

      L40:  static readonly deploy: IDeployPluginAPI;
      L41:  constructor(appId: string, customOptions?: any);

[18:39:27]  typescript: .../Desktop/Ulises/Ionic/PlantillaIonic/node_modules/@ionic/pro/dist/src/index.d.ts, line: 54
            Property 'IonicCordova' does not exist on type 'Window'.

      L53:  getPlugin(): Promise<Window['IonicCordova'] | undefined>;
      L55:   * Wait for the underlying platform to be "ready."

Error: Failed to transpile program
    at new BuildError (C:\Users\Ulises\Desktop\Ulises\Ionic\PlantillaIonic\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28)
    at C:\Users\Ulises\Desktop\Ulises\Ionic\PlantillaIonic\node_modules\@ionic\app-scripts\dist\transpile.js:159:20
    at new Promise (<anonymous>)
    at transpileWorker (C:\Users\Ulises\Desktop\Ulises\Ionic\PlantillaIonic\node_modules\@ionic\app-scripts\dist\transpile.js:107:12)
    at Object.transpile (C:\Users\Ulises\Desktop\Ulises\Ionic\PlantillaIonic\node_modules\@ionic\app-scripts\dist\transpile.js:64:12)
    at C:\Users\Ulises\Desktop\Ulises\Ionic\PlantillaIonic\node_modules\@ionic\app-scripts\dist\build.js:109:82
    at <anonymous>

How could I fix this?

Thanks.

Bump. I am having absolutely the same errors. Would be nice if someone could jump in with some suggestions. We are paying for this service after all…

PS: Can you share the ionic info you get from the build?

Hi, sorry but I totally forgot about this topic. I believe this was an issue about versions, if you’re using the latest version of Ionic Pro you should use at least Android 6.4

It’s either that or you are trying to use a plugin which isn’t compatible with the Android version you’re using. Versions stuff is hell.

Let me know if it works so I can mark this reply as the solution