App_Script Error -

Hi All I am getting below error when executed
ionic cordova build iOS

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        ';' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        '(' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        ']' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        ',' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        Property assignment expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        ')' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        '(' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        ']' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        ',' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        Property assignment expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        Property assignment expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        ',' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        ':' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        '{' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        ':' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        ',' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        ':' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        Expression expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        ')' expected. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 633

        ';' expected. 



 L633:      interface Calls {       

 L634:          /** By chaining the spy with calls.any(), will return false if the spy has not been called at all, and then true once at least one call happens. **/

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 718

        Declaration or statement expected. 



 L717:  randomizeTests(value?: any): boolean;

 L718:  seed(value: any): void;

 L719:  showColors(value: any): void;

[17:23:07] typescript: src/pages/registration/registration-option/registration-option.ts, line: 51

        Cannot find name 'InAppBrowser'. 



  L50:  constructor(public loadingCtrl: LoadingController, public toast: ToastController,

  L51:    public authservice: LinkedInAuthProvider, public platform: Platform, private iab: InAppBrowser,

  L52:    public navCtrl: NavController, public navParams: NavParams,

[17:23:07] typescript: src/pages/product-service/product-service-view/product-service-view.ts, line: 36

        Cannot find name 'InAppBrowser'. 



  L35:  constructor(public navCtrl: NavController, public navParams: NavParams, private storage: Storage, public platform: Platform,

  L36:    public businessListService: BusinessListingProvider, private iab: InAppBrowser) {

  L37:    //this.timebasenavigation()

[17:23:07] typescript: src/pages/profile/client-partner-view/client-partner-view.ts, line: 122

        Cannot find name 'InAppBrowser'. 



 L122:  else {            

 L123:    this.hideInput = true

[17:23:07] typescript: src/app/app.module.ts, line: 166

        Argument of type '{ declarations: (typeof ModalSortFilterComponent | typeof RegistrationPage | typeof 

        PartnerPopupC...' is not assignable to parameter of type 'NgModule'. Types of property 'providers' are 

        incompatible. Type '(typeof Network | typeof SplashScreen | typeof MobileAccessibility | typeof Market | 

        typeof Geolo...' is not assignable to type 'Provider[]'. Type 'typeof Network | typeof SplashScreen | typeof 

        MobileAccessibility | typeof Market | typeof Geoloc...' is not assignable to type 'Provider'. Type 

        'InAppBrowserOriginal' is not assignable to type 'Provider'. Type 'InAppBrowserOriginal' is not assignable 

        to type 'ClassProvider'. Property 'provide' is missing in type 'InAppBrowserOriginal'. 



 L166:  @NgModule({                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

 L167:      declarations: [

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        An object literal cannot have multiple properties with the same name in strict mode. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

 L141:      function pp(value: any): string;

[17:23:07] typescript: Users/apple/Documents/IonicProjects/node_modules/@types/jasmine/index.d.ts, line: 140

        'ReadonlyArray' only refers to a type, but is being used as a value here. 



 L139:      function createSpyObj<T>(methodNames: SpyObjMethodNames): SpyObj<T>;

Below is the output of ionic info-
cli packages: (/Users/apple/.nvm/versions/node/v8.7.0/lib/node_modules)

@ionic/cli-utils  : 1.19.2

ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0 

local packages:

@ionic/app-scripts : 3.2.2

Cordova Platforms  : ios 4.5.5

Ionic Framework    : ionic-angular 3.9.5

System:

ios-deploy : 1.9.2 

Node       : v8.7.0

npm        : 5.4.2 

OS         : macOS High Sierra

Xcode      : Xcode 10.1 Build version 10B61 

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

This is happening on iOS only. Android works fine.
Request you to help on this.

  1. npm install typescript@2.8.4 --save-dev
  2. npm install @types/jasmine@2.8.3 --save-dev

This SO solution worked for me!!!

Thanks