Building App Error

with cli running ionic cordova build android no problem but when i try to build in ionic pro for iphone i get the following errors.
error TS2307: Cannot find module ‘jspdf’.
error TS2307: Cannot find module ‘dom-to-image’.
error TS2307: Cannot find module ‘@ionic-native/file/ngx’.
error TS2307: Cannot find module ‘@ionic-native/file-opener/ngx’.
error TS2307: Cannot find module ‘@ionic/storage’.
Thank you in advance

Can you check in your package.json if these modules/packages are listed too?

None appear, do I have to add manually? Thanks mate

1 Like

That might be the problem.
When adding packages make sure you use the --save flag. That wil make npm save the added package to the package.json file. Unfortunately the new Ionic docs don’t use the --save flag anymore. That’s where it has gone wrong.

Basically what now is happening is that the Ionic Pro CLI doesn’t download those packages for you because they aren’t listed. So when your code tries to ‘use’ those packages it cann’t find them. Giving you this error. Easiest way for you would be install all the packages again but with using the --save flag.

e.g.
npm install @ionic-native/file --save