Cannot find module "./app.module.ngfactory"

I upgraded Ionic from RC1 to RC3 in accordance with the documentation instructions, after which I cannot launch the application in Android correctly using ionic run android or ionic build android . Previewing with ionic serve and .apk build works correctly, but when I run the application on my device or in the emulator, it shows a splash screen after the empty WebView. When I debug through chrome://inspect , it shows the following error in the console:

 main.js:7 Uncaught Error: Cannot find module "./app.module.ngfactory" 

I made a backup copy of the project folder before the upgrade, when my application worked correctly, and the code is the same (no changes during the upgrade), and app.module.ts , main.dev.ts and main.prod.ts good. I tried to delete the .tmp folder and node-modules and run npm install again, but the error persists.

+6
source share
2 answers

check this out: https://forum.ionicframework.com/t/cannot-find-module-app-module-ngfactory/72832/3

The newest version of typescript caused an error for me.

+3
source

In my case, I had an import problem with NGTranslate.

See here Ionic Forum Post

+1
source

Source: https://habr.com/ru/post/1013066/


All Articles