I extracted sample template code from this tutorial and did below two steps to get started -
npm install // worked fine and created node_modules folder
reinstalling rxjs -> npm install rxjs@6 rxjs-compat@6 --save
thanks the answer of zmag and Rahul Sharma, it works! @zmag @Rahul Sharma
"rxjs": "5.4.1",
"typescript": "~2.4.0"
my problem is as follow:
typings/globals/core-js/index.d.ts:3:14 - error TS2300: Duplicate identifier
Make changes as.
GO to Package.json file and modify the below configuration
"rxjs": "5.4.1",
"typescript": "~2.4.0"
GO to Package.json file and modify the below configuration
...
"rxjs": "5.4.1",
"typescript": "~2.4.0"
...
It will work
Just a little bit of detail, in an attempt to put in my two cents.
The problem arises when we upgrade Typescript to the latest version, which by now was TypeScript 2.4.1, [ "as we love the upgrades : )" ], and as mentioned by @Jonnysai in his answer and the link provided there, there is a detailed discussion regarding the problem and its fixes.
So, what worked for me was:
1. I had to Uninstall TypeScript 2.4.1 first, by going to Control Panel > Programs and Features...
2. Install, afresh, TypeScript 2.4.0, and then make sure, in package.json
file, you have this
configuration, as mentioned here in a rather shorter detail.
You can download TypeScript 2.4.0 from here, for Visual Studio 2015
As per this you need update typescript 2.3.4 or rxjs 6 alpha
go the your package.json file in your project update typescript or rxjs version. Example
"typescript": "2.3.4"
do npm install
update(06/29/2017):-
As per the comments typescript "2.4.0"
working.
Please change the following line of Subject.d.ts
file:
lift<R>(operator: Operator<T, R>): Observable<T>;
to:
lift<R>(operator: Operator<T, R>): Observable<R>;
The return type should probably be Observable<R>
rather than Observable<T>