Got the same problem here
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.
Same problem (RC3): ionic serve works fine, but ionic build fails with that same message.
Updating/adding the src/declarations.d.ts worked for me. tnx @mcrespi
Please remove the ^ character from your package.json file as mentioned here.
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.
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