Skip to content

ng build --prod #5779

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

Closed
doczoidberg opened this issue Mar 31, 2017 · 3 comments
Closed

ng build --prod #5779

doczoidberg opened this issue Mar 31, 2017 · 3 comments

Comments

@doczoidberg
Copy link

Versions.

@angular/cli: 1.0.0-rc.2
node: 6.9.5
os: win32 x64
@angular/common: 4.0.1
@angular/compiler: 4.0.1
@angular/core: 4.0.1
@angular/forms: 4.0.1
@angular/http: 4.0.1
@angular/platform-browser: 4.0.1
@angular/platform-browser-dynamic: 4.0.1
@angular/router: 4.0.1
@angular/cli: 1.0.0-rc.2
@angular/compiler-cli: 4.0.1
@angular/language-service: 4.0.1

Repro steps.

Component inject firebase in constructor:

@Inject(FirebaseApp) firebase: firebase.app.App

The log given by the failure.

ERROR in Error encountered resolving symbol values statically. Expression form not supported (position 80:176 in the original .ts file), resolving symbol Editor in /app/components/editor/editor.ts

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in ...
 @ ./src/main.ts 4:0-74
 @ multi ./src/main.ts

this error occurs only with ng build --prod

@malecki-se
Copy link

Try with stable release of angular-cli 1.0. You have @angular/cli: 1.0.0-rc.2

@filipesilva
Copy link
Contributor

Heya, errors like Error encountered resolving symbol values statically mean that there has been some problem in statically analyzing your app.

The CLI always runs statical analysis on code to ensure it will run when compiled with AOT. This may cause a lot of static analysis errors to surface when importing your project into the CLI, or upgrading for older versions where we didn't run this kind of analysis.

A good resource on how to to debug these errors is https://github.com/rangle/angular-2-aot-sandbox#aot-dos-and-donts.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants