I am using the observable object in an Angular 5 project of mine - up until a week or so ago it was running fine, now all of a sudden I'm getting the following error:
ERROR in node_modules/rxjs/Observable.d.ts(20,31): error TS1183: An implementation cannot be declared in ambient contexts.
I'm a bit of a newbie with Angular so any help would be much appreciated. Thanks!
I tried reinstalling "rxjs" with the following command:
npm install rxjs
This didn't solved my problem.
The only thing that worked for me it was:
Replacing node_module folder with a new one
You can get it from new project or even delete and recreated it by executing:
npm install
Note: I would suggest to take it from new created project, for some reason this command do not work sometimes.
In Angular 6 my Observables worked, but a "ng build --prod" gave the TS1183 error. My solution was:
npm install rxjs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With