Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

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

I got an error of

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

after the installation of Angular 6.

Check the error:

ERROR in node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';' expected.
node_modules/rxjs/internal/types.d.ts(81,74): error TS1005: ';' expected.
node_modules/rxjs/internal/types.d.ts(81,77): error TS1109: Expression expected.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...