angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

Error in ionic build --prod

Open ourarash opened this issue 9 years ago • 2 comments

Version info

Angular: 4.0.0 Firebase: 3 AngularFire: latest Other (e.g. Ionic/Cordova, Node, browser, operating system):

Your system information:

ordova CLI: 6.5.0 Ionic Framework Version: 3.0.1 Ionic CLI Version: 2.2.1 Ionic App Lib Version: 2.2.0 Ionic App Scripts Version: 1.3.4 ios-deploy version: Not installed ios-sim version: Not installed OS: Windows 10 Node Version: v7.9.0 Xcode version: Not installed

How to reproduce these conditions

ionic build --prod Failing test unit, Plunkr, or JSFiddle demonstrating the problem

NA Steps to set up and reproduce ionic build --prod

Sample data and security rules NA <-- include/attach/link to some json sample data (or provide credentials to a sanitized, test Firebase project) --> NA

Debug output

** Errors in the JavaScript console **

[12:04:03] Error: Error encountered resolving symbol values statically. Expression form not supported (position 30:44 in the original .ts file), resolving symbol FirebaseSdkAuthBackend in ./node_modules/angularfire2/auth/firebase_sdk_auth_backend.d.ts Error: Error encountered resolving symbol values statically. Expression form not supported (position 30:44 in the original .ts file), resolving symbol FirebaseSdkAuthBackend in ./node_modules/angularfire2/auth/firebase_sdk_auth_backend.d.ts at positionalError (.\upfront_client\node_modules@angular\compiler\bundles\compiler.umd.js:23471:35) at simplifyInContext (.\upfront_client\node_modules@angular\compiler\bundles\compiler.umd.js:23314:27) at StaticReflector.simplify (.\upfront_client\node_modules@angular\compiler\bundles\compiler.umd.js:23328:13) at StaticReflector.parameters (.\upfront_client\node_modules@angular\compiler\bundles\compiler.umd.js:22855:65) at CompileMetadataResolver._getDependenciesMetadata (.\upfront_client\node_modules@angular\compiler\bundles\compiler.umd.js:14292:71) at CompileMetadataResolver._getTypeMetadata (.\upfront_client\node_modules@angular\compiler\bundles\compiler.umd.js:14217:26) at CompileMetadataResolver.getInjectableSummary (.\upfront_client\node_modules@angular\compiler\bundles\compiler.umd.js:14189:24) at .\upfront_client\node_modules@angular\compiler\bundles\compiler.umd.js:22263:383 at Array.map (native) at AotCompiler._createSummary (.\upfront_client\node_modules@angular\compiler\bundles\compiler.umd.js:22263:331)

** Output from firebase.database().enableLogging(true); ** NA ** Screenshots ** NA

Expected behavior

No errors

No errors

Actual behavior

I upgraded to latest version of ionic (3.0.1.). Now ionic --prod generates this error:

  ionic-app-script task: "build"
[12:04:03]  Error: Error encountered resolving symbol values statically. Expression form not supported (position 30:44
            in the original .ts file), resolving symbol FirebaseSdkAuthBackend in
            ./node_modules/angularfire2/auth/firebase_sdk_auth_backend.d.ts
Error: Error encountered resolving symbol values statically. Expression form not supported (position 30:44 in the original .ts file), resolving symbol FirebaseSdkAuthBackend in ./node_modules/angularfire2/auth/firebase_sdk_auth_backend.d.ts
    at positionalError (.\\upfront_client\node_modules\@angular\compiler\bundles\compiler.umd.js:23471:35)
    at simplifyInContext (.\\upfront_client\node_modules\@angular\compiler\bundles\compiler.umd.js:23314:27)
    at StaticReflector.simplify (.\\upfront_client\node_modules\@angular\compiler\bundles\compiler.umd.js:23328:13)
    at StaticReflector.parameters (.\\upfront_client\node_modules\@angular\compiler\bundles\compiler.umd.js:22855:65)
    at CompileMetadataResolver._getDependenciesMetadata (.\\upfront_client\node_modules\@angular\compiler\bundles\compiler.umd.js:14292:71)
    at CompileMetadataResolver._getTypeMetadata (.\\upfront_client\node_modules\@angular\compiler\bundles\compiler.umd.js:14217:26)
    at CompileMetadataResolver.getInjectableSummary (.\\upfront_client\node_modules\@angular\compiler\bundles\compiler.umd.js:14189:24)
    at .\\upfront_client\node_modules\@angular\compiler\bundles\compiler.umd.js:22263:383
    at Array.map (native)
    at AotCompiler._createSummary (.\\upfront_client\node_modules\@angular\compiler\bundles\compiler.umd.js:22263:331)


ourarash avatar Apr 22 '17 19:04 ourarash

Moving AngularFireModule.initializeApp(FirebaseConfig), right after BrowserModule in app.module.ts fixed this for me:

imports: [ BrowserModule, AngularFireModule.initializeApp(FirebaseConfig), IonicModule.forRoot(MyApp, { scrollAssist: false, autoFocusAssist: false, backButtonText: '', swipeBackEnabled: false }),

ourarash avatar Apr 22 '17 19:04 ourarash

imports: [ FormsModule, HttpModule, JsonpModule, BrowserModule, AngularFireModule.initializeApp(firebaseConfig),

Not works

chris-eduardo avatar Sep 26 '17 19:09 chris-eduardo