Skip to content Skip to sidebar Skip to footer

Ionic Uncaught Error: Cannot Find Module "." When Importing A Service Provider

I am trying to import a new service provider that I just created after pulling from the latest branch in my ionic app. When I try to import this line of code: import { AuthServiceP

Solution 1:

I finally figure it out to solve the problem. The error occurs when I import the events from ionic-angular.

So instead of: import { Events } from 'ionic-angular/umd';

Just remove the umd at the end. I don't know why it happened because I am using auto import from my vs code.

Solution 2:

I changed import { Events } from 'ionic-angular/umd'; to import { Events } from 'ionic-angular';. I was using "typescript": "~2.6.2". I tried to change the version of typescript and I have heard that typescript 3.1 can be fix in some cases. In my case once i went higher than typescript 2.8.0 I started getting other issues related to ionic. At the end the above fix works, and I think this is more a ionic framework issue.

Post a Comment for "Ionic Uncaught Error: Cannot Find Module "." When Importing A Service Provider"