Rxjs: ERROR in node_modules/rxjs/internal/types.d.ts

Created on 30 Jan 2019  路  14Comments  路  Source: ReactiveX/rxjs

Bug Report

Current Behavior
I am getting following errror after using npm start or ng build --prod

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.

Expected behavior
npm start or ng build command should run without any error.

Environment

Most helpful comment

@monukanyal2017 we are trying to figure out which part is actually affects this, I or @cartant will fill bit more detail here.

All 14 comments

What's typescript version / and is there reproducible repo?

"typescript": "~2.7.0"

Per this (https://github.com/ReactiveX/rxjs/pull/4405#pullrequestreview-196802187) change, it requires 2.8 version of typescript compiler.

@kwonoj should i change it 2.7.0 to 2.8.0? angular version is 6.0.0

@monukanyal2017 we are trying to figure out which part is actually affects this, I or @cartant will fill bit more detail here.

We've investigated the issue and the problem is that some versions of projects generated using Angular CLI have an RxJS dependency of ^6.0.0 and a TypeScript dependency of ~2.7.2.

RxJS version 6.4 uses a conditional type to facilitate some improvements to its types and conditional types were introduced in TypeScript 2.8. We are currently looking into the best way of addressing the problem.

Same issue

@cartant , Please let me know , should i install lower version of Rxjs?

To workaround the issue, you can pin RxJS to 6.3 by changing the dependency version in your package.json for RxJS to "rxjs": "~6.3.3".

I am also facing the same issue . updated rxjs to 6.3.3, still getting the same issue.

I've created a new issue to track this problem here https://github.com/ReactiveX/rxjs/issues/4512.

@sachin-dbox, if you can create a minimum reproduction of that, please file a new issue and link in there. Happy to help if we can.

Updating type script worked for me npm install -g typescript@latest

Locking this. Refer to #4512

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matthewwithanm picture matthewwithanm  路  4Comments

cartant picture cartant  路  3Comments

cartant picture cartant  路  3Comments

marcusradell picture marcusradell  路  4Comments

peterbakonyi05 picture peterbakonyi05  路  4Comments