Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I updated Ionic from RC1 to RC3 following the documentation instructions and after that I can't run my app properly in Android using ionic run android or ionic build android. Previewing with ionic serve and .apk build works properly, but when I run the app in my device or in an emulator, it shows the splashscreen and after a blank WebView. When I debug via chrome://inspect, it shows in console the following error:

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

I made a backup of the project folder before the update, when my app was working properly, and the code is the same (no changes during the upgrade), and the app.module.ts, main.dev.ts and main.prod.ts seems fine. I tried remove .tmp and node-modules folder and run npm install again, but the error persists.

like image 834
Erick2280 Avatar asked Dec 11 '16 04:12

Erick2280


2 Answers

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

The newest version of typescript caused the error for me.

like image 104
Jan Heinzle Avatar answered Oct 20 '22 15:10

Jan Heinzle


In my case I had an import problem with NGTranslate.

See here Ionic Forum Post

like image 1
Lerb90 Avatar answered Oct 20 '22 14:10

Lerb90