[ts] Cannot find module './app.module.ngfactory'

Got the same problem here

1 Like

I have found a solution that worked for me. In src/declarations.d.ts I had only

declare module ‘lodash’;

I have ovewritted by

declare module ‘*’;

And then I have been able to execute “ionic build android” successfully.

3 Likes

Same problem (RC3): ionic serve works fine, but ionic build fails with that same message.

1 Like

Updating/adding the src/declarations.d.ts worked for me. tnx @mcrespi

Please remove the ^ character from your package.json file as mentioned here.

1 Like

Another issue might be the Typescript version. Latest version (2.1.x) is not yet compatible with Angular/Ionic. This causes the same error. Try using 2.0.x.

2 Likes

as mentioned by @jose2007kj post, it helped me to resolve the issue. But frankly same code base in other folder with “^” in package.json is working. weird

thanks, you saved me!

What fixed the error?

Make sure to install angular-cli