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

Cannot build project with aot #3

Open
alexeyvasilyev opened this issue Jan 2, 2017 · 7 comments
Open

Cannot build project with aot #3

alexeyvasilyev opened this issue Jan 2, 2017 · 7 comments

Comments

@alexeyvasilyev
Copy link

alexeyvasilyev commented Jan 2, 2017

ng build --prod --aot

ERROR in Error encountered resolving symbol values statically. Only initialized variables and constants can be referenced because the value of this variable is needed by the template compiler (position 2:22 in the original .ts file), resolving symbol animateFactory in /Users/alex/Projects/my_proj/client/web_angular/node_modules/ng2-animate/dist/index.d.ts, resolving symbol EventComponent in /Users/alex/Projects/my_proj/client/web_angular/src/app/components/event.component.ts, resolving symbol EventComponent in /Users/alex/Projects/my_proj/client/web_angular/src/app/components/event.component.ts, resolving symbol EventComponent in /Users/alex/Projects/my_proj/client/web_angular/src/app/components/event.component.ts

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

ERROR in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js Module not found: Error: Can't resolve '/Users/alex/Projects/my_proj/client/web_angular/src/$$_gendir' in '/Users/alex/Projects/my_proj/client/web_angular/node_modules/@angular/core/src/linker' @ ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js 69:15-36 85:15-102 @ ./~/@angular/core/src/linker.js @ ./~/@angular/core/src/core.js @ ./~/@angular/core/index.js @ ./src/main.ts @ multi main

Project made with angular-cli 1.0.0-beta.24

@alexeyvasilyev
Copy link
Author

More info here angular/angular-cli#3706

@yogesh7607
Copy link

I have the same problem too.

@yogesh7607
Copy link

@alexeyvasilyev did you find any workaround / solution?

@yogesh7607
Copy link

I am using these tools

@angular/cli: 1.0.0-rc.0
node: 7.6.0
os: linux x64
@angular/common: 2.4.8
@angular/compiler: 2.4.8
@angular/compiler-cli: 2.4.8
@angular/core: 2.4.8
@angular/forms: 2.4.8
@angular/http: 2.4.8
@angular/material: 2.0.0-beta.2
@angular/platform-browser: 2.4.8
@angular/platform-browser-dynamic: 2.4.8
@angular/platform-server: 2.4.8
@angular/router: 3.4.8
@angular/cli: 1.0.0-rc.0

@alexeyvasilyev
Copy link
Author

No. Haven't find.

@AckerApple
Copy link

I had to alter some of the syntax in my recent pull request and I am wondering if this at all helps solve your own issues. I am looking to have more eyes on my pull request, please take a look : #4

@AckerApple
Copy link

My fork supports AOT. It's on NPM : https://www.npmjs.com/package/ack-angular-fx

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

3 participants