angular6 运行时报错 ERROR in node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ‘;’ expected.

错误信息:

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.

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

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

node_modules/rxjs/internal/types.d.ts(82,92): error TS1109: Expression expected.

解决方法:

在package.json文件里面 修改 “rxjs”: “^6.0.0” 为 “rxjs”: “6.0.0”,然后在项目中运行?npm update