I am facing an issue when I try to build my app using the following command :
ionic cordova run android --prod --release
Everything runs fine if
I had the same problem , but for me, two components with the same name were there something like below,
my-first-app\src\app\header\header.component.ts
my-first-app\src\header\header.component.ts
the second one is unused and wrongly placed as all my codes were inside my-first-app\src\app only. I removed the second one and it resolved my issue.