I’m getting the following error:
Running app-scripts build: --prod
[19:18:02] build prod started ...
[19:18:02] clean started ...
[19:18:02] clean finished in 1 ms
[19:18:02] copy started ...
[19:18:02] deeplinks started ...
[19:18:02] deeplinks finished in 42 ms
[19:18:02] ngc started ...
Error: Can't resolve all parameters for MyApp in /Users/rafa/natal-food/imoto-motoboys/src/app/app.component.ts: ([object Object], [object Object], [object Object], ?).
at syntaxError (my_project/node_modules/@angular/compiler/bundles/compiler.umd.js:1729:34)
at CompileMetadataResolver._getDependenciesMetadata (my_project/node_modules/@angular/compiler/bundles/compiler.umd.js:15816:35)
at CompileMetadataResolver._getTypeMetadata (my_project/node_modules/@angular/compiler/bundles/compiler.umd.js:15684:26)
at CompileMetadataResolver.getNonNormalizedDirectiveMetadata (my_project/node_modules/@angular/compiler/bundles/compiler.umd.js:15279:24)
at CompileMetadataResolver._getEntryComponentMetadata (my_project/node_modules/@angular/compiler/bundles/compiler.umd.js:15938:45)
at my_project/node_modules/@angular/compiler/bundles/compiler.umd.js:15924:48
at Array.forEach (<anonymous>)
at CompileMetadataResolver._getEntryComponentsFromProvider (my_project/node_modules/@angular/compiler/bundles/compiler.umd.js:15923:30)
at my_project/node_modules/@angular/compiler/bundles/compiler.umd.js:15887:83
at Array.forEach (<anonymous>)
[19:18:04] copy finished in 2.43 s
Here is the related code:
constructor(
public platform: Platform,
public statusBar: StatusBar,
public splashScreen: SplashScreen,
private motoboy: Motoboy,
) {
Yes, I have that class declared in providers
in app.modules.ts
, it successfully works without the --prod
flag.
I tried to upgrade angular
packages and it stacktrace mentioned AoT
files, not sure what to do with it though.
$ ionic info
cli packages: (/Users/rafa/.nvm/versions/node/v9.5.0/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.8
Cordova Platforms : android 6.3.0 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
Node : v9.5.0
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : /Users/rafa/Library/Android/sdk
Misc:
backend : pro
Anyone has a clue?
Thanks!