Components: compile with the mode aot

Created on 18 Nov 2016  路  5Comments  路  Source: angular/components

Bug, feature request, or proposal:

Try to compile with the mode aot

Cannot determine the module for class FocusTrap in node_modules/@angular/material/core/a11y/focus-trap.d.ts!
at analyzeNgModules (/node_modules/@angular/compiler/bundles/compiler.umd.js:13079:17)
at OfflineCompiler.compileModules (/node_modules/@angular/compiler/bundles/compiler.umd.js:13115:20)
at CodeGenerator.codegen (/node_modules/@angular/compiler-cli/src/codegen.js:58:30)
at codegen (/node_modules/@angular/compiler-cli/src/main.js:7:81)
at Object.main (/@angular/tsc-wrapped/src/main.js:30:16)
at Object. (/@angular/compiler-cli/src/main.js:16:9)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)

What is the expected behavior?

Compile with aot option

Most helpful comment

I had the same issue, it got fixed (for AoT compilation, haven't tested running it yet) when I forced installing version "@angular/material": "2.0.0-alpha.10".

try npm install @angular/[email protected] --save

Seems an older version gets installed if you don't specify the version manually. That's an npm view of the versions.

http://prntscr.com/d9xzdu

All 5 comments

I think you're having this issue because you used yarn instead of npm install. For some reason, yarn doesn't bring in all of the files in the package correctly.

I didn't use yarn...

@kgiroux Make sure you have a decently up-to-date node and npm, wipe out node_modules and re-install.

Here is a sample app that uses alpha.10 with AoT without any issues:
https://github.com/jelbourn/material2-app

I had the same issue, it got fixed (for AoT compilation, haven't tested running it yet) when I forced installing version "@angular/material": "2.0.0-alpha.10".

try npm install @angular/[email protected] --save

Seems an older version gets installed if you don't specify the version manually. That's an npm view of the versions.

http://prntscr.com/d9xzdu

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vitaly-t picture vitaly-t  路  3Comments

MurhafSousli picture MurhafSousli  路  3Comments

kara picture kara  路  3Comments

dzrust picture dzrust  路  3Comments

constantinlucian picture constantinlucian  路  3Comments