The recent upgrade from Angular 5 to Angular 6 has been throwing a few errors in existing Angular 5 Applications and one of them is Module has no exported method ‘Observable’.
If your application uses Observable
module exported from 'rxjs/Observable'
then there is chance you will probably receive this error when you upgrade your Angular 5 application to Angular 6.
The error will look like this when running ng serve
or ng build
:-
The steps to solve the error Module has no exported method ‘Observable’ are following:
Step 1
Open package.json
file in some text editor (I am using Notepad ++).
Step 2
Update the version of rxjs
to "^6.2.1"
dependency and add a new dependency rxjs-compat
with version "^6.1.0"
Step 3
Run npm install
and wait for it to install the dependencies.
Step 4
Now run ng serve
or ng build
. The application will run without error.
Conclusion
That’s it. Hope it save a bit of your time. Still if you are having with the error or any other error, send an email to me and I will fix the problem. Of course it will be paid 🙂 Email ID- jimcute8879@gmail.com