node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';' expected error after installation of Angular 6

前端 未结 16 927
甜味超标
甜味超标 2020-12-22 17:15

I got an error of

node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: \';\' expected.

after the installation of Angular

相关标签:
16条回答
  • 2020-12-22 17:26

    I had the same error using angular 6 having rxjs@6.4.0 but i downgraded it to rxjs@6.3.3 it worked.

    0 讨论(0)
  • 2020-12-22 17:28

    I had same problem

    npm install typescript@2.8.0 
    

    solved my problem

    0 讨论(0)
  • 2020-12-22 17:30

    Go to the project directory run this command

    npm install rxjs@6.0.0 --save

    0 讨论(0)
  • 2020-12-22 17:30

    if you are still facing the problem, go to package.json

    1. remove rxjs and add rxjs-compat also, "rxjs-compat": "^6.4.0" to "rxjs-compat": "6.4.0",

    2. change the typscript version to 2.8

    3. run npm install

    This will work for you!

    0 讨论(0)
  • 2020-12-22 17:32

    This problem might arise due to version mismatch. To solve your problem you need to do following changes in your package.json file.

    Step 1 : Go to package.json and modify "rxjs": "^6.0.0" to "rxjs": "6.0.0"

    Step 2 Run npm install in your project.

    There is no need to change the typescript version. (Mine: "typescript": "~2.7.2")

    Edit: If you are using rxjs-compat then you also need to do following in order to fixed the issue. change the rxjs-compat version from "rxjs-compat": "^6.2.2" to "rxjs-compat": "6.2.2"

    Hope this will help!

    0 讨论(0)
  • 2020-12-22 17:33

    Go To package.json and modify "rxjs": "^6.0.0" to "rxjs": "6.0.0"

    Then run

    npm update
    

    Then start the server

    ng serve
    

    Problem solved 100%

    0 讨论(0)
提交回复
热议问题