1
resposta

(index):22 Error: TypeError: Cannot read property 'annotations' of undefined

(index):22 Error: TypeError: Cannot read property 'annotations' of undefined at ReflectionCapabilities.annotations (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:2139:38) at Reflector.annotations (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:2328:52) at NgModuleResolver.resolve (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:13848:46) at CompileMetadataResolver.getNgModuleMetadata (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:14096:49) at RuntimeCompiler.compileComponents (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:16803:49) at RuntimeCompiler._compileModuleAndComponents (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:16741:39) at RuntimeCompiler.compileModuleAsync (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:16732:23) at PlatformRef.bootstrapModuleWithZone (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:6954:29) at PlatformRef.bootstrapModule (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:6936:25) at Object.eval (http://localhost:3000/app/main.js:5:10) Evaluating http://localhost:3000/app/main.js Error loading http://localhost:3000/app/main.js

ALGUEM SABE O QUE QUER DIZER?

1 resposta

Bom dia,

Vai no seu arquivo chamado app.component.ts e modifica o

export class App { ....

para:

export class AppComponent

e no seu main.ts verifica se tem esses imports:

import {bootstrap} from 'angular2/platform/browser';
import {AppComponent} from './app.component';

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software