How Can I Resolve Ionic Uncaught Error: Cannot Find Module "." When Adding New Page?
Uncaught Error: Cannot find module '.' at webpackMissingModule (index.js:3) at e.code (index.js:3) at Object. (index.js:9) at __webpack_require__
Solution 1:
remove the umd
from the import
change
import { NavController } from'ionic-angular/umd';
to
import { NavController } from'ionic-angular';
check this for more details.
Solution 2:
Finally figured out, when creating the project from ionic cli
the IonicPageModule
was missing on the project.
Adding IonicPageModule
manually in project and running command npm run-script
fixed the issue.
Solution
app-module.ts
import { IonicPageModule } from'ionic-angular'; imports: [ IonicPageModule.forChild(HomePage) ],
npm run-script build
NOTE: IonicPageModule
is an NgModule
that bootstraps a child IonicPage
in order to set up routing.
PS: Still dint know how that worked, but that worked. Thanks everyone for trying to help.
Post a Comment for "How Can I Resolve Ionic Uncaught Error: Cannot Find Module "." When Adding New Page?"