node_modules/rxjs/internal/types.d.ts(81,44): 错误 TS1005: ';'安装 Angular 6 后的预期错误 [英] node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';' expected error after installation of Angular 6
问题描述
我有一个错误
node_modules/rxjs/internal/types.d.ts(81,44): 错误 TS1005: ';'预期.
node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';' expected.
安装 Angular 6 之后.
after the installation of Angular 6.
检查错误:
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.
推荐答案
这个问题可能是因为版本不匹配.要解决您的问题,您需要在 package.json 文件中进行以下更改.
This problem might arise due to version mismatch. To solve your problem you need to do following changes in your package.json file.
步骤 1 : 到 package.json
并将 "rxjs": "^6.0.0"
修改为 "rxjs": "6.0.0"
Step 1 : Go to package.json
and modify "rxjs": "^6.0.0"
to "rxjs": "6.0.0"
步骤 2 在您的项目中运行 npm install
.
Step 2 Run npm install
in your project.
无需更改打字稿版本.(我的:"typescript": "~2.7.2"
)
There is no need to change the typescript version. (Mine: "typescript": "~2.7.2"
)
如果您使用的是 rxjs-compat
,那么您还需要执行以下操作以解决问题.将 rxjs-compat
版本从 "rxjs-compat": "^6.2.2"
更改为 "rxjs-compat": "6.2.2"代码>
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"
希望这会有所帮助!
这篇关于node_modules/rxjs/internal/types.d.ts(81,44): 错误 TS1005: ';'安装 Angular 6 后的预期错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!