Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ionic build --prod problem with AOT compile #931

Closed
rodrifmed opened this issue Apr 30, 2017 · 5 comments
Closed

Ionic build --prod problem with AOT compile #931

rodrifmed opened this issue Apr 30, 2017 · 5 comments

Comments

@rodrifmed
Copy link

Version info

Angular:
4.1.0
Firebase:
3.9.0
AngularFire:
2.0.0-beta.8
Other (e.g. Ionic/Cordova, Node, browser, operating system):
Cordova CLI: 6.5.0
Ionic Framework Version: 3.1.1
Ionic CLI Version: 2.2.3
Ionic App Scripts Version: 1.3.6
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v7.9.0
Npm Version: 4.2.0
Xcode version: Not installed

How to reproduce these conditions

When execute ionic build android --prod, I have this output problem:

[10:24:29] ionic-app-scripts 1.3.6
[10:24:29] build prod started ...
[10:24:29] clean started ...
[10:24:29] clean finished in 5 ms
[10:24:29] copy started ...
[10:24:29] ngc started ...
[10:24:32] ionic-app-script task: "build"
[10:24:32] 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
D:/javascript_projects/teste-angularfire/node_modules/angularfire2/node_modules/@angular/core/src/di/metadata.d.ts,
resolving symbol Injectable in
D:/javascript_projects/teste-angularfire/node_modules/angularfire2/node_modules/@angular/core/src/di.d.ts,
resolving symbol Injectable in
D:/javascript_projects/teste-angularfire/node_modules/angularfire2/node_modules/@angular/core/src/core.d.ts,
resolving symbol Injectable in
D:/javascript_projects/teste-angularfire/node_modules/angularfire2/node_modules/@angular/core/index.d.ts,
resolving symbol AngularFireAuth in
D:/javascript_projects/teste-angularfire/node_modules/angularfire2/auth/auth.d.ts, resolving symbol
AngularFireAuth in D:/javascript_projects/teste-angularfire/node_modules/angularfire2/auth/auth.d.ts
Error: Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the functio
n or lambda with a reference to an exported function, resolving symbol Injectable in D:/javascript_projects/teste-angularfire/node_modules/angularfire2/node_mo
dules/@angular/core/src/di/metadata.d.ts, resolving symbol Injectable in D:/javascript_projects/teste-angularfire/node_modules/angularfire2/node_modules/@angul
ar/core/src/di.d.ts, resolving symbol Injectable in D:/javascript_projects/teste-angularfire/node_modules/angularfire2/node_modules/@angular/core/src/core.d.ts
, resolving symbol Injectable in D:/javascript_projects/teste-angularfire/node_modules/angularfire2/node_modules/@angular/core/index.d.ts, resolving symbol Ang
ularFireAuth in D:/javascript_projects/teste-angularfire/node_modules/angularfire2/auth/auth.d.ts, resolving symbol AngularFireAuth in D:/javascript_projects/l
oja10-manager-v3/node_modules/angularfire2/auth/auth.d.ts
at syntaxError (D:\javascript_projects\teste-angularfire\node_modules@angular\compiler\bundles\compiler.umd.js:1550:34)
at simplifyInContext (D:\javascript_projects\teste-angularfire\node_modules@angular\compiler\bundles\compiler.umd.js:23870:23)
at StaticReflector.simplify (D:\javascript_projects\teste-angularfire\node_modules@angular\compiler\bundles\compiler.umd.js:23882:13)
at StaticReflector.annotations (D:\javascript_projects\teste-angularfire\node_modules@angular\compiler\bundles\compiler.umd.js:23331:41)
at NgModuleResolver.resolve (D:\javascript_projects\teste-angularfire\node_modules@angular\compiler\bundles\compiler.umd.js:13883:70)
at CompileMetadataResolver.getNgModuleMetadata (D:\javascript_projects\teste-angularfire\node_modules@angular\compiler\bundles\compiler.umd.js:14473:60)
at addNgModule (D:\javascript_projects\teste-angularfire\node_modules@angular\compiler\bundles\compiler.umd.js:23050:58)
at D:\javascript_projects\teste-angularfire\node_modules@angular\compiler\bundles\compiler.umd.js:23061:14
at Array.forEach (native)
at _createNgModules (D:\javascript_projects\teste-angularfire\node_modules@angular\compiler\bundles\compiler.umd.js:23060:26)

Steps to set up and reproduce

run ionic build android --prod

@prestonvanloon
Copy link

Duplicate of #843?

@rodrifmed
Copy link
Author

@prestonvanloon You are right! I searched earlier, but I did not find anything like it.

I will close this issue and follow the #843.

Thanks!

@rodrifmed
Copy link
Author

Hi,

I tried the version 4.0.0-rc0, but now I'm having others problems.

First I can't instantitate authconfig like AngularFireModule.initializeApp(myFirebaseConfig, myFirebaseAuthConfig)

And I'm having this error

Module '"D:/my_project/node_modules/angularfire2/index"' has no exported member
'AngularFire'

when run ionic build android.

@prestonvanloon
Copy link

prestonvanloon commented Apr 30, 2017

There are many new/breaking changes with 4.0.0-rc0. See #854 for details.

Edit: If you want an example of the changes required, I just went through this in this PR

@rodrifmed
Copy link
Author

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants