Hey everyone,
I’ve noticed this issue with my Ionic build. When I run ionic cordova build ios --prod, I get the following errors:
Running app-scripts build: --prod --iscordovaserve --externalIpRequired --nobrowser
[18:02:10] build prod started ...
[18:02:10] clean started ...
[18:02:10] clean finished in 5 ms
[18:02:10] copy started ...
[18:02:10] ngc started ...
[18:02:12] build prod failed: Error encountered resolving symbol values statically. Calling function 'makeDecorator',
function calls are not supported. Consider replacing the function or lambda with a reference to an exported
function, resolving symbol Injectable in
/Applications/MAMP/htdocs/bandly-app-mobile/node_modules/angularfire2/node_modules/@angular/core/src/di/metadata.d.ts,
resolving symbol Injectable in
/Applications/MAMP/htdocs/bandly-app-mobile/node_modules/angularfire2/node_modules/@angular/core/src/di.d.ts,
resolving symbol Injectable in
/Applications/MAMP/htdocs/bandly-app-mobile/node_modules/angularfire2/node_modules/@angular/core/src/core.d.ts,
resolving symbol Injectable in
/Applications/MAMP/htdocs/bandly-app-mobile/node_modules/angularfire2/node_modules/@angular/core/index.d.ts,
resolving symbol AngularFireAuth in
/Applications/MAMP/htdocs/bandly-app-mobile/node_modules/angularfire2/auth/auth.d.ts, resolving symbol
AngularFireAuth in /Applications/MAMP/htdocs/bandly-app-mobile/node_modules/angularfire2/auth/auth.d.ts
[WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova). Your plugins may be out of date.
Error: Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in /Applications/MAMP/htdocs/bandly-app-mobile/node_modules/angularfire2/node_modules/@angular/core/src/di/metadata.d.ts, resolving symbol Injectable in /Applications/MAMP/htdocs/bandly-app-mobile/node_modules/angularfire2/node_modules/@angular/core/src/di.d.ts, resolving symbol Injectable in /Applications/MAMP/htdocs/bandly-app-mobile/node_modules/angularfire2/node_modules/@angular/core/src/core.d.ts, resolving symbol Injectable in /Applications/MAMP/htdocs/bandly-app-mobile/node_modules/angularfire2/node_modules/@angular/core/index.d.ts, resolving symbol AngularFireAuth in /Applications/MAMP/htdocs/bandly-app-mobile/node_modules/angularfire2/auth/auth.d.ts, resolving symbol AngularFireAuth in /Applications/MAMP/htdocs/bandly-app-mobile/node_modules/angularfire2/auth/auth.d.ts
When I run ionic cordova build ios
, I don’t get the errors, only when I add the --prod
flag.
Here is my package.json file:
dependencies": {
"@angular/common": "4.0.2",
"@angular/compiler": "4.0.2",
"@angular/compiler-cli": "4.0.2",
"@angular/core": "4.0.2",
"@angular/forms": "4.0.2",
"@angular/http": "4.0.2",
"@angular/platform-browser": "4.0.2",
"@angular/platform-browser-dynamic": "4.0.2",
"@ionic-native/camera": "^3.8.0",
"@ionic-native/core": "3.6.1",
"@ionic-native/facebook": "^3.8.0",
"@ionic-native/file": "^3.6.1",
"@ionic-native/geolocation": "^3.8.0",
"@ionic-native/in-app-browser": "^3.8.0",
"@ionic-native/keyboard": "^3.8.0",
"@ionic-native/splash-screen": "^3.6.1",
"@ionic-native/status-bar": "3.6.1",
"@ionic-native/transfer": "^3.8.0",
"@ionic/cli-plugin-cordova": "^1.3.0",
"@ionic/storage": "2.0.1",
"@types/algoliasearch": "^3.18.0",
"@types/jasmine": "^2.5.41",
"@types/lodash": "^4.14.55",
"@types/lodash.update": "^4.10.1",
"algoliasearch": "^3.21.1",
"angular2-autosize": "^1.0.1",
"angular2-moment": "^1.0.0",
"angularfire2": "^2.0.0-beta.7-pre",
"cordova-android": "6.1.0",
"cordova-ios": "^4.4.0",
"cordova-plugin-admobpro": "^2.28.3",
"cordova-plugin-camera": "^2.4.1",
"cordova-plugin-compat": "^1.1.0",
"cordova-plugin-console": "^1.0.7",
"cordova-plugin-crosswalk-webview": "^2.3.0",
"cordova-plugin-device": "^1.1.6",
"cordova-plugin-email": "^1.2.6",
"cordova-plugin-extension": "^1.5.1",
"cordova-plugin-facebook4": "^1.9.0",
"cordova-plugin-file": "^4.3.3",
"cordova-plugin-file-transfer": "^1.6.3",
"cordova-plugin-geolocation": "^2.4.3",
"cordova-plugin-inappbrowser": "^1.7.1",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.2.3",
"cordova-plugin-whitelist": "^1.3.2",
"cordova-plugin-wkwebview-engine": "git+https://github.com/driftyco/cordova-plugin-wkwebview-engine.git",
"firebase": "^3.7.2",
"imgcache.js": "^1.1.1",
"ionic-angular": "3.1.1",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"lodash": "^4.17.2",
"moment": "^2.17.1",
"ng-semantic": "^1.1.13",
"ng2-toasty": "^4.0.0",
"prod": "^1.0.1",
"rxjs": "5.1.1",
"sw-toolbox": "3.4.0",
"zone.js": "^0.8.10"
},
"devDependencies": {
"@angular/cli": "^1.0.4",
"@ionic/app-scripts": "1.1.4",
"@ionic/cli-plugin-cordova": "1.1.1",
"@ionic/cli-plugin-ionic-angular": "1.3.0",
"@ionic/cli-plugin-ionic1": "1.3.0",
"typescript": "~2.2.1"
},
And when I run ionic info
:
[ERROR] Error with /Applications/MAMP/htdocs/bandly-app-mobile/www/lib/ionic/version.json file: FILE_NOT_FOUND
global packages:
@ionic/cli-plugin-proxy : 1.3.0
@ionic/cli-utils : 1.3.0
Cordova CLI : 7.0.0
Ionic CLI : 3.3.0
local packages:
@ionic/app-scripts : 1.1.4
@ionic/cli-plugin-cordova : 1.3.0
@ionic/cli-plugin-ionic-angular : 1.3.0
@ionic/cli-plugin-ionic1 : 1.3.0
Cordova Platforms : ios 4.4.0
Ionic Framework : ionic-angular 3.1.1
Ionic Framework : unknown
System:
Node : v6.9.0
OS : OS X El Capitan
Xcode : Xcode 8.2.1 Build version 8C1002
ios-deploy : 1.9.1
ios-sim : 5.0.13
Could this be an issue with typings? Anyway, if anyone has run into this issue as well, let me know! Thanks in advance!
UPDATE: Updating the latest version of AngularFire2 4.0 solved my issue.