Greetings, my problem is the following.
With Ionic 3 I started to implement lazy loading for all my pages. There is one page that is returning this error log:
ERROR Error: Uncaught (in promise): Error: Cannot find module “.”
Error: Cannot find module “.”
at webpackMissingModule (index.js:3)
at Array.concat.e.code (index.js:3)
at Object. (index.js:9)
at webpack_require (bootstrap bd92f535657e07097829:54)
at Object. (my-custom-model.ts:26)
at webpack_require (bootstrap bd92f535657e07097829:54)
at Object. (0.js:12)
at webpack_require (bootstrap bd92f535657e07097829:54)
at src lazy:124 […]
my-custom-model is a simple custom model which is defined like this:
export class MyCustomModel{
someAttribute: String;
constructor() {
}
}
This class is under “/src/datatypes”. I import this model from my pages like this:
import { MyCustomModel} from ‘…/…/datatypes/my-custom-model’;
Also, we instantiate objects from this class, so we do not use Interface type.
This code was working correctly before I changed to lazy loading. Do you know what could be wrong?
Should I import the model in the page module?
The only source I found about this was: https://github.com/JohnWeisz/TypedJSON/issues/57 . However, it is not the same case as I am not using this library.
I appreciate your time and help.
local packages:
@ionic/app-scripts : 3.1.5
Cordova Platforms : android 6.4.0 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v6.10.2
npm : 5.6.0