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
Keep the noStrictGeneric option true in tsconfig.config file
{
"compilerOptions": {
"noStrictGenericChecks": true
}
}
I found same problem and I solved it by using "rxjs": "5.4.1", "typescript": "~2.4.0" and adding "noStrictGenericChecks": true into tsconfig.json.
Now we dont need the ionic-native module - we only need @ionic-native/core. Run
npm uninstall ionic-native --save
It will solve Your Problem..
An admitted band-aid approach is to add the following to your tsconfig.json file until the RxJS folks decide what they want to do about the error when using TypeScript 2.4.1 :
"compilerOptions": {
"skipLibCheck": true,
}
RxJS 6 will have this fixed, but as a temporary workaround, you can use the noStrictGenericChecks
compiler option.
In tsconfig.json
, put it in compilerOptions
and set it to true.
{
"compilerOptions": {
"noStrictGenericChecks": true
}
}
On the command line it's --noStrictGenericChecks
.
Why it's happening:
TypeScript 2.4 has a strictness change, and Subject isn't lifting to the correct Observable. The signature really should have been
(operator: Operator) => Observable
This will be fixed in RxJS 6.
Add "noStrictGenericChecks": true in tsconfig.json file under "compilerOptions" node as shown in below image & build application. I have faced same error after adding this error resolved.