Build error Can't resolve './app.module.ngfactory'


#1

Can you get me any idea to resolve this error.
“ionic cordova build android --prod --release” giving the following error:

D:\mypath>ionic cordova build android --prod --release
Running app-scripts build: --prod --platform android --target cordova
[22:55:20] build prod started ...
[22:55:20] clean started ...
[22:55:20] clean finished in 3 ms
[22:55:20] copy started ...
[22:55:20] copy finished in 142 ms
[22:55:20] deeplinks started ...
[22:55:20] deeplinks finished in 63 ms
[22:55:20] ngc started ...
[22:55:26] ngc finished in 6.07 s
[22:55:26] preprocess started ...
[22:55:26] preprocess finished in less than 1 ms
[22:55:26] webpack started ...
Error: ./src/app/main.ts
Module not found: Error: Can't resolve './app.module.ngfactory' in 'D:\mypath\src\app'
resolve './app.module.ngfactory' in 'D:\mypath\src\app'
using description file: D:\mypath\package.json (relative path: ./src/app)
Field 'browser' doesn't contain a valid alias configuration
after using description file: D:\mypath\package.json (relative path: ./src/app)
using description file: D:\mypath\package.json (relative path: ./src/app/app.module.ngfactory)
no extension
Field 'browser' doesn't contain a valid alias configuration
D:\mypath\src\app\app.module.ngfactory doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
D:\mypath\src\app\app.module.ngfactory.ts doesn'texist
.js
Field 'browser' doesn't contain a valid alias configuration
D:\mypath\src\app\app.module.ngfactory.js doesn'texist
.json
Field 'browser' doesn't contain a valid alias configuration
D:\mypath\src\app\app.module.ngfactory.json doesn't existas directory
D:\mypath\src\app\app.module.ngfactory doesn't exist
[D:\mypath\src\app\app.module.ngfactory]
[D:\mypath\src\app\app.module.ngfactory.ts]
[D:\mypath\src\app\app.module.ngfactory.js]
[D:\mypath\src\app\app.module.ngfactory.json]
[D:\mypath\src\app\app.module.ngfactory]
@ ./src/app/main.ts 3:0-60
at new BuildError (D:\mypath\node_modules@ionic\app-scripts\dist\util\errors.js:16:28)
at callback (D:\mypath\node_modules@ionic\app-scripts\dist\webpack.js:121:28)
at emitRecords.err (D:\mypath\node_modules\webpack\lib\Compiler.js:269:13)
at Compiler.emitRecords (D:\mypath\node_modules\webpack\lib\Compiler.js:375:38)
at emitAssets.err (D:\mypath\node_modules\webpack\lib\Compiler.js:262:10)
at applyPluginsAsyncSeries1.err (D:\mypath\node_modules\webpack\lib\Compiler.js:368:12)
at next (D:\mypath\node_modules\tapable\lib\Tapable.js:218:11)
at Compiler.compiler.plugin (D:\mypath\node_modules\webpack\lib\performance\SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (D:\mypath\node_modules\tapable\lib\Tapable.js:222:13)
at Compiler.afterEmit (D:\mypath\node_modules\webpack\lib\Compiler.js:365:9)

D:\mypath>

#2

nevermind,
reworking from the beginning