angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Angular-cli AOT support.

Open compitDanielos opened this issue 10 years ago • 4 comments

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

compitDanielos avatar Nov 28 '16 08:11 compitDanielos

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

export const slideInPartial: AnimationEntryMetaData = ...

AnimationEntryMetaData is imported from @angular/core.

charpeni avatar Nov 28 '16 17:11 charpeni

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

clydin avatar Nov 28 '16 19:11 clydin

Closing as solved, answers already covered everything.

filipesilva avatar Dec 29 '16 19:12 filipesilva

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.