Runtime Error - Cannot Find Module "."

Not sure what I did wrong, but i’ve apparently made a change that causes this error to show when running on “ionic serve”. I’ve tried backtracking, but I still haven’t been able to find this issue. Anyone have any ideas of what could possibly be the issue?

ionic info:

global packages:

@ionic/cli-utils : 1.3.0
Cordova CLI      : 6.4.0
Ionic CLI        : 3.3.0

local packages:

@ionic/app-scripts              : 1.3.7
@ionic/cli-plugin-cordova       : 1.3.0
@ionic/cli-plugin-ionic-angular : 1.3.0
Cordova Platforms               : ios 4.3.1
Ionic Framework                 : ionic-angular 3.2.1


Node       : v7.0.0
OS         : macOS Sierra
Xcode      : Xcode 8.3.2 Build version 8E2002
ios-deploy : 1.9.0
ios-sim    : 5.0.13

Can’t post code… as there’s a lot of it. But i’m sure the issue is something really small

Does the error give the Module it cant find? What type is it? Was it included in the app.module.ts file?

Nope it’s quite vague I feel.

Here’s a screenshot of the specific error:

Check all your imports for something looking like import {Foo} from '.', and in the future post text as text, not screenshots.


Fixed it, seems auto import on visual code imported the wrong module.

It imported:

import { ToastController } from 'ionic-angular/umd';

instead of

import { ToastController } from 'ionic-angular';

It works to me too but I’d to change in all .ts files in my project where had an import from ‘ionic-angular/umd’; to import from ‘ionic-angular’;


It works, thank you.

1 Like

Yeah! I had the same error with vscode. Thanks :+1:

1 Like

Where is this command? import { ToastController } from ‘ionic-angular/umd’;
I couldn’t find it.

1 Like

Thanks dude! Saved my day. :slight_smile: