Ionic Package: Can't build the application for production

#1

I run this command to build the application

ionic package build android/ios --profile profileName

  • it run well and build for development purpose

but when I try to build for production using this command

ionic package build android --profile profileName --release --prod

  • it fires this error
#2

Read the error message. Remove the declaration of Ini from IniModule or AppModule. Done.

#3

Yes
I had to delete these files ini.module.ts and won.module.ts
they generated by default with ionic g page command

problem solved

#4

Then you are not on the most recent version of everything. This was fixed a few days ago with app-scripts 2.0.2 and ionic-angular 3.5.3.

1 Like
split this topic #5

A post was split to a new topic: Ionic Package: RequestTimeout