Angular-cli: Angular-cli AOT support.

Created on 28 Nov 2016  路  4Comments  路  Source: angular/angular-cli

OS?

Mac OSX Yosemite

Versions.

angular-cli: 1.0.0-beta.21
node: 6.3.0
os: darwin x64

The log given by the failure.

Exported variable 'slideInPartial' has or is using name 'AnimationEntryMetadata' from external module "/node_modules/@angular/core/src/animation/metadata" but cannot be named.)

Mention any other details that might be useful.

tsconfig.aot.json:

{
  "declaration": false,
  "compilerOptions": {
    "target": "es5",
    "module": "es2015",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "suppressImplicitAnyIndexErrors": true,
    "pretty": true,
    "allowUnreachableCode": false,
    "allowUnusedLabels": false,
    "noImplicitAny": false,
    "noImplicitReturns": false,
    "noImplicitUseStrict": false,
    "noFallthroughCasesInSwitch": true,
    "noEmitOnError": true,
    "outDir": "./dist/unbundled-aot",
    "types": [
      "node",
      "jasmine"
    ],
    "paths": {
      "angular-cli/*": [ "./packages/angular-cli/*" ],
      "@angular-cli/ast-tools": [ "./packages/ast-tools/src" ],
      "@angular-cli/base-href-webpack": [ "./packages/base-href-webpack/src" ],
      "@ngtools/webpack": [ "./packages/webpack/src" ]
    }
  },
  "exclude": [
    "node_modules",
    "dist",
    "packages/angular-cli/blueprints/*/files/**/*",
    "dist/**/*",
    "node_modules/**/*",
    "tmp/**/*"
  ],
  "angularCompilerOptions": {
    "genDir": "aot",
    "skipMetadataEmit": true
  }
}

Execution command:
ng serve --aot -p src/tsconfig.aot.json

Any changes in tsconfig.aot.json dose not affect anything.
Any Idea or help would be appreciated.

Thanks

Most helpful comment

To solve this, go where you export slideInPartial and type it to AnimationEntryMetadata.

export const slideInPartial: AnimationEntryMetaData = ...

AnimationEntryMetaData is imported from @angular/core.

All 4 comments

To solve this, go where you export slideInPartial and type it to AnimationEntryMetadata.

export const slideInPartial: AnimationEntryMetaData = ...

AnimationEntryMetaData is imported from @angular/core.

Also, -p configures the listening port. And passing a tsconfig doesn't do anything; It's not needed anyway.

Closing as solved, answers already covered everything.

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

brtnshrdr picture brtnshrdr  路  3Comments

ericel picture ericel  路  3Comments

JanStureNielsen picture JanStureNielsen  路  3Comments

gotschmarcel picture gotschmarcel  路  3Comments

purushottamjha picture purushottamjha  路  3Comments