K. Ajay
K. Ajay

Reputation: 417

Getting a lot of TypeScript errors after running Ionic project on MacOs

I have developed an Ionic app and it is working fine on windows. I am running MacOs El Capitan on VirtualBox. I have setup everything on MacOs, but when i try to run the app using Ionic Serve I get many typescript errors which i don't get on windows.

I searched a lot of solutions but none of them fixed my issue.

These are the errors

[app-scripts] [03:55:07] typescript: node_modules/@types/jasmine/index.d.ts, line: 138 [app-scripts]
';' expected. [app-scripts] L138: function createSpyObj(methodNames: SpyObjMethodNames): any; [app-scripts]
L139: function createSpyObj(methodNames: SpyObjMethodNames): SpyObj; [app-scripts] '(' expected. [app-scripts]
L138: function createSpyObj(methodNames: SpyObjMethodNames): any; [app-scripts] [03:55:07] typescript: node_modules/@types/jasmine/index.d.ts, line: 138 [app-scripts] [03:55:07] typescript: node_modules/@types/jasmine/index.d.ts, line: 138 [app-scripts] L139: function createSpyObj(methodNames: SpyObjMethodNames): SpyObj; [app-scripts] ']' expected. [app-scripts] L138:
function createSpyObj(methodNames: SpyObjMethodNames): any; [app-scripts] L139: function createSpyObj(methodNames: SpyObjMethodNames): SpyObj; [app-scripts] ',' expected. [app-scripts] L138: function createSpyObj(methodNames: SpyObjMethodNames): any; [app-scripts] L139: function createSpyObj(methodNames: SpyObjMethodNames): SpyObj; [app-scripts] Property assignment expected. [app-scripts] L138: function createSpyObj(methodNames: SpyObjMethodNames): any; [app-scripts] L139: function createSpyObj(methodNames: SpyObjMethodNames): SpyObj; [app-scripts] ')' expected. [app-scripts] L138: function createSpyObj(methodNames: SpyObjMethodNames): any; [app-scripts] [03:55:07] typescript: node_modules/@types/jasmine/index.d.ts, line: 138 [app-scripts] [03:55:07] typescript: node_modules/@types/jasmine/index.d.ts, line: 138 [app-scripts] [03:55:07] typescript: node_modules/@types/jasmine/index.d.ts, line: 138 [app-scripts] [03:55:07] typescript: node_modules/@types/jasmine/index.d.ts, line: 138 [app-scripts] [03:55:07] typescript: node_modules/@types/jasmine/index.d.ts, line: 138 [app-scripts] [03:55:07] typescript: node_modules/@types/jasmine/index.d.ts, line: 138

Upvotes: 2

Views: 741

Answers (1)

Balakrishnan Bsk
Balakrishnan Bsk

Reputation: 493

Reinstall your app script using below command

npm install @ionic/app-scripts@latest --save-dev

and run the below command also

npm rebuild node-sass

and run your project it will work fine

ionic serve

Upvotes: 2

Related Questions