-
Notifications
You must be signed in to change notification settings - Fork 314
TypeError: Cannot read property 'ngModuleByPipeOrDirective' of undefined #1500
Description
Description:
when I run build code ( ionic cordova build android --prod --release )
I giving this:
[05:50:02] ionic-app-scripts 3.2.1
[05:50:02] build prod started ...
[05:50:02] clean started ...
[05:50:02] clean finished in 2 ms
[05:50:02] copy started ...
[05:50:02] deeplinks started ...
[05:50:02] deeplinks finished in 54 ms
[05:50:02] ngc started ...
[05:50:06] ionic-app-script task: "build"
[05:50:06] TypeError: Cannot read property 'ngModuleByPipeOrDirective' of undefined
TypeError: Cannot read property 'ngModuleByPipeOrDirective' of undefined
at AotCompiler.emitAllImpls (/Users/aaa/Project/CCA/node_modules/@angular/compiler/bundles/compiler.umd.js:30807:55)
at AngularCompilerProgram.generateFilesForEmit (/Users/aaa/Project/CCA/node_modules/@angular/compiler-cli/src/transformers/program.js:736:46)
at AngularCompilerProgram._emitRender2 (/Users/aaa/Project/CCA/node_modules/@angular/compiler-cli/src/transformers/program.js:330:27)
at AngularCompilerProgram.emit (/Users/aaa/Project/CCA/node_modules/@angular/compiler-cli/src/transformers/program.js:236:22)
at /Users/aaa/Project/CCA/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:223:38
at step (/Users/aaa/Project/CCA/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:32:23)
at Object.next (/Users/aaa/Project/CCA/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:13:53)
at fulfilled (/Users/aaa/Project/CCA/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:4:58)
[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.
My ionic info:
Ionic:
ionic (Ionic CLI) : 4.5.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.1
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.1, (and 5 other plugins)
System:
NodeJS : v10.13.0 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave