Module has no exported method ‘Observable’ : Angular 6

module has no exported method observable

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:-

module has no exported method observable error

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"

module has no exported method observable

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.

module has no exported method observable

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

Leave a Reply

Your email address will not be published. Required fields are marked *