components: Alpha 9 AoT compiler error

Hey guys,

  • I updated to the new Alpha 9, upgraded to the single Material Module. So far, things work great in development.

BUT: running the AoT compiler results in errors: (compiler-cli 0.6.2):


Error: parameters received {"filePath":"/Users/lrj/projects/angular2-webpack2-typescript2/node_modules/@angular/material/core/a11y/live-announcer.d.ts","name":"MdLiveAnnouncer"} which is not a StaticSymbol
    at StaticReflector.parameters (/Users/lrj/projects/angular2-webpack2-typescript2/node_modules/@angular/compiler-cli/src/static_reflector.js:92:19)
    at CompileMetadataResolver.getDependenciesMetadata (/Users/lrj/projects/angular2-webpack2-typescript2/node_modules/@angular/compiler/bundles/compiler.umd.js:14336:81)
    at CompileMetadataResolver.getTypeMetadata (/Users/lrj/projects/angular2-webpack2-typescript2/node_modules/@angular/compiler/bundles/compiler.umd.js:14301:28)
    at /Users/lrj/projects/angular2-webpack2-typescript2/node_modules/@angular/compiler/bundles/compiler.umd.js:14448:43
    at Array.forEach (native)
    at CompileMetadataResolver.getProvidersMetadata (/Users/lrj/projects/angular2-webpack2-typescript2/node_modules/@angular/compiler/bundles/compiler.umd.js:14428:21)
    at /Users/lrj/projects/angular2-webpack2-typescript2/node_modules/@angular/compiler/bundles/compiler.umd.js:14435:43
    at Array.forEach (native)
    at CompileMetadataResolver.getProvidersMetadata (/Users/lrj/projects/angular2-webpack2-typescript2/node_modules/@angular/compiler/bundles/compiler.umd.js:14428:21)
    at /Users/lrj/projects/angular2-webpack2-typescript2/node_modules/@angular/compiler/bundles/compiler.umd.js:14120:73
Compilation failed

Anyone stumbled across this?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 6
  • Comments: 15 (4 by maintainers)

Most upvoted comments

I’m unable to compile aswell. Appears to be a similar issue to @szechyjs.

slmyers@slmyers-Inspiron-5559:~/Projects/screenerClient$ ng build --aot
 10% building modules 3/6 modules 3 active ...ode_modules/style-loader/addStyles.js/home/slmyers/Projects/screenerClient/node_modules/@angular/material/list/list.css:214
.map*/
^
SyntaxError: Unexpected token .
    at WebpackResourceLoader._evaluate (/home/slmyers/Projects/screenerClient/node_modules/@ngtools/webpack/src/resource_loader.js:75:24)
    at /home/slmyers/Projects/screenerClient/node_modules/@ngtools/webpack/src/resource_loader.js:95:52

using these angular modules

"@angular/common": "2.0.1",
    "@angular/compiler": "2.0.1",
    "@angular/core": "2.0.1",
    "@angular/forms": "2.0.1",
    "@angular/http": "2.0.1",
    "@angular/material": "2.0.0-alpha.9-3",
    "@angular/platform-browser": "2.0.1",
    "@angular/platform-browser-dynamic": "2.0.1",
    "@angular/router": "3.0.1",

And this ng cli version

slmyers@slmyers-Inspiron-5559:~/Projects/screenerClient$ ng -v
angular-cli: 1.0.0-beta.16
node: 6.7.0
os: linux x64

I just tried alpha.9-3 and got the following error from ng build -aot

10% building modules 3/6 modules 3 active ...ode_modules/style-loader/addStyles.js/Users/jared/code/foo/node_modules/@angular/material/icon/icon.css:83
.map*/
^
SyntaxError: Unexpected token .
    at WebpackResourceLoader._evaluate (/Users/jared/code/foo/node_modules/@ngtools/webpack/src/resource_loader.js:75:24)
    at /Users/jared/code/foo/node_modules/@ngtools/webpack/src/resource_loader.js:95:52

Just published alpha.9-3, which should resolve this.

I can reproduce this and am trying to figure out what’s wrong. AFAICT, MdLiveAnnouncer isn’t doing anything weird, so it’s not clear where the problem lives.

Same error for me. It would be nice to have AOT compile validation as a part of build if it not already there.