Cant build for android production!

although i can build an apk for debug sucessfully, i cant seem to build for production!!
i use:

$ ionic cordova build android --prod --release

i get the following error:

 at <anonymous>
[ERROR] An error occurred while running subprocess ionic-app-scripts.

        ionic-app-scripts build --prod --target cordova --platform android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
    throw new TypeError(

TypeError: Invalid data, chunk must be a string or buffer, not object
    at Socket.write (net.js:704:11)
    at process.<anonymous> (C:\Users\h2001\AppData\Roaming\npm\node_modules\ionic\bin\ionic:9:63)
    at emitTwo (events.js:126:13)
    at process.emit (events.js:214:7)
    at emitPendingUnhandledRejections (internal/process/promises.js:108:22)
    at process._tickCallback (internal/process/next_tick.js:189:7)

i downloaded scripts manually and i still get the same error!

$ npm install -g @ionic/app-scripts@latest --save-dev

any ideas?

Having same issue since recently… don’t know which update cause this…

try to use:

cordova build android --prod --release

Chez moi --prod ne fonctionne pas.
J’ai mis ionic cordova run android et ça fonctionne sur l’emulateur