rxjs icon indicating copy to clipboard operation
rxjs copied to clipboard

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

Open monukanyal2017 opened this issue 7 years ago • 14 comments

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

  • Runtime: Node {8.9.0} NPM{6.4.0}
  • RxJS version:6.4.0

monukanyal2017 avatar Jan 30 '19 05:01 monukanyal2017

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

kwonoj avatar Jan 30 '19 05:01 kwonoj

"typescript": "~2.7.0"

monukanyal2017 avatar Jan 30 '19 05:01 monukanyal2017

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

kwonoj avatar Jan 30 '19 05:01 kwonoj

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

monukanyal2017 avatar Jan 30 '19 06:01 monukanyal2017

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

kwonoj avatar Jan 30 '19 06:01 kwonoj

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.

cartant avatar Jan 30 '19 06:01 cartant

Same issue

ErxrilOwl avatar Jan 30 '19 07:01 ErxrilOwl

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

monukanyal2017 avatar Jan 30 '19 08:01 monukanyal2017

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".

cartant avatar Jan 30 '19 08:01 cartant

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

sachin-dbox avatar Jan 30 '19 08:01 sachin-dbox

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

benlesh avatar Jan 30 '19 18:01 benlesh

@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.

benlesh avatar Jan 30 '19 18:01 benlesh

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

NdumisoMthembu avatar Feb 01 '19 07:02 NdumisoMthembu

Locking this. Refer to #4512

cartant avatar Feb 01 '19 08:02 cartant