Unable to create production build

i am unable to build on Ubuntu using --prod option,and create the following error

Running app-scripts build: --prod --platform android --target cordova
[11:28:59] build prod started …
[11:28:59] clean started …
[11:28:59] clean finished in 25 ms
[11:28:59] copy started …
[11:29:00] deeplinks started …
[11:29:00] deeplinks finished in 284 ms
[11:29:00] ngc started …
[11:29:18] ngc finished in 18.18 s
[11:29:18] preprocess started …
[11:29:18] preprocess finished in 1 ms
[11:29:18] webpack started …
[11:29:19] copy finished in 19.84 s
Error: ./src/app/main.ts
Module not found: Error: Can’t resolve ‘./app.module.ngfactory’ in '/home/user/Desktop/myApp/src/app’
resolve ‘./app.module.ngfactory’ in '/home/user/Desktop/myApp/src/app’
using description file: /home/user/Desktop/myApp/package.json (relative path: ./src/app)
Field ‘browser’ doesn’t contain a valid alias configuration
after using description file: /home/user/Desktop/myApp/package.json (relative path: ./src/app)
using description file: /home/user/Desktop/myApp/package.json (relative path: ./src/app/app.module.ngfactory)
no extension
Field ‘browser’ doesn’t contain a valid alias configuration
/home/user/Desktop/myApp/src/app/app.module.ngfactory doesn’t exist
.ts
Field ‘browser’ doesn’t contain a valid alias configuration
/home/user/Desktop/myApp/src/app/app.module.ngfactory.ts doesn’t exist
.js
Field ‘browser’ doesn’t contain a valid alias configuration
/home/user/Desktop/myApp/src/app/app.module.ngfactory.js doesn’t exist
.json
Field ‘browser’ doesn’t contain a valid alias configuration
/home/user/Desktop/myApp/src/app/app.module.ngfactory.json doesn’t exist
as directory
/home/user/Desktop/myApp/src/app/app.module.ngfactory doesn’t exist
[/home/user/Desktop/myApp/src/app/app.module.ngfactory]
[/home/user/Desktop/myApp/src/app/app.module.ngfactory.ts]
[/home/user/Desktop/myApp/src/app/app.module.ngfactory.js]
[/home/user/Desktop/myApp/src/app/app.module.ngfactory.json]
[/home/user/Desktop/myApp/src/app/app.module.ngfactory]
@ ./src/app/main.ts 2:0-60
at new BuildError (/home/user/Desktop/myApp/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at callback (/home/user/Desktop/myApp/node_modules/@ionic/app-scripts/dist/webpack.js:121:28)
at emitRecords.err (/home/user/Desktop/myApp/node_modules/webpack/lib/Compiler.js:265:13)
at Compiler.emitRecords (/home/user/Desktop/myApp/node_modules/webpack/lib/Compiler.js:371:38)
at emitAssets.err (/home/user/Desktop/myApp/node_modules/webpack/lib/Compiler.js:258:10)
at applyPluginsAsyncSeries1.err (/home/user/Desktop/myApp/node_modules/webpack/lib/Compiler.js:364:12)
at next (/home/user/Desktop/myApp/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/home/user/Desktop/myApp/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/home/user/Desktop/myApp/node_modules/tapable/lib/Tapable.js:222:13)
at Compiler.afterEmit (/home/user/Desktop/myApp/node_modules/webpack/lib/Compiler.js:361:9)

@shijintr can you share the ionic-cli version?. This is fixed in 3.1.1 of @ionic/app-scripts.

here is the out put of my ionic info

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.1
ionic (Ionic CLI) : 3.19.1

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.0
Cordova Platforms  : android 6.4.0 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v9.2.1
npm               : 5.5.1
OS                : Linux 4.4

Environment Variables:

ANDROID_HOME : /home/user/android-sdk

Misc:

backend : pro