Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error - node_modules\@types\jasmine\index.d.ts(138,230) TS1005: ')' expected

Below is the versions i am using "@types/jasmine": "^2.8.9" "typescript": "~2.6.2"

 "devDependencies": {
        "@ionic/app-scripts": "3.2.0",
        "@types/jasmine": "^2.8.9",
        "@types/node": "^10.12.5",
        "angular2-template-loader": "^0.6.2",
        "html-loader": "^0.5.5",
        "istanbul-instrumenter-loader": "^3.0.1",
        "jasmine": "^3.3.0",
        "jasmine-spec-reporter": "^4.2.1",
        "karma": "^3.1.1",
        "karma-chrome-launcher": "^2.2.0",
        "karma-coverage-istanbul-reporter": "^2.0.4",
        "karma-jasmine": "^1.1.2",
        "karma-jasmine-html-reporter": "^1.4.0",
        "karma-sourcemap-loader": "^0.3.7",
        "karma-webpack": "^3.0.5",
        "null-loader": "^0.1.1",
        "protractor": "^5.4.1",
        "ts-loader": "^3.5.0",
        "ts-node": "^7.0.1",
        "typescript": "~2.6.2"
      },

But still i am getting the below error

Error: node_modules/@types/jasmine/index.d.ts(138,47): error TS1005: ';' expected.
node_modules/@types/jasmine/index.d.ts(138,90): error TS1005: '(' expected.
node_modules/@types/jasmine/index.d.ts(138,104): error TS1005: ']' expected.
node_modules/@types/jasmine/index.d.ts(138,112): error TS1005: ',' expected.
node_modules/@types/jasmine/index.d.ts(138,113): error TS1136: Property assignment expected.
node_modules/@types/jasmine/index.d.ts(138,121): error TS1005: ')' expected.
node_modules/@types/jasmine/index.d.ts(138,147): error TS1005: '(' expected.
node_modules/@types/jasmine/index.d.ts(138,162): error TS1005: ']' expected.
node_modules/@types/jasmine/index.d.ts(138,163): error TS1005: ',' expected.
node_modules/@types/jasmine/index.d.ts(138,164): error TS1136: Property assignment expected.
node_modules/@types/jasmine/index.d.ts(138,165): error TS1136: Property assignment expected.
node_modules/@types/jasmine/index.d.ts(138,179): error TS1005: ',' expected.
node_modules/@types/jasmine/index.d.ts(138,183): error TS1005: ':' expected.
node_modules/@types/jasmine/index.d.ts(138,208): error TS1005: '{' expected.
node_modules/@types/jasmine/index.d.ts(138,217): error TS1005: ':' expected.
node_modules/@types/jasmine/index.d.ts(138,222): error TS1005: ',' expected.
node_modules/@types/jasmine/index.d.ts(138,227): error TS1005: ':' expected.
node_modules/@types/jasmine/index.d.ts(138,228): error TS1109: Expression expected.
node_modules/@types/jasmine/index.d.ts(138,230): error TS1005: ')' expected.

I am not getting how to resolve this. Can anyone please help me.

like image 513
ananya Avatar asked Nov 14 '18 07:11

ananya


3 Answers

If you are still having the issue, in package.json add

"typescript": "^2.9.2"

Run npm install.

It should work.

like image 189
Mehak Fatima Avatar answered Oct 01 '22 04:10

Mehak Fatima


I have fixed it changing my package versions:

"@types/jasmine": "2.8.6",
"@types/jasminewd2": "2.0.3",

Founded in this post: Angular 4+ : Sudden @types/jasmine error at runtime (npm start)

like image 36
monikaja Avatar answered Oct 01 '22 05:10

monikaja


You have just change [email protected] and @types/[email protected]

Like

  1. npm install [email protected] --save-dev
  2. npm install @types/[email protected] --save-dev

It's working 100%.

Thanks,

like image 38
Yogesh Kumar Avatar answered Oct 01 '22 04:10

Yogesh Kumar