Angular 2 RC5更新区域问题

时间:2016-08-22 09:01:21

标签: angular

  

zone.js:461未处理的承诺拒绝:TypeError:无法读取   属性'type'为null   在eval   (http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13673:45)         at Array.forEach(native)         at getTransitiveModules(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13672:17)         at CompileMetadataResolver._getTransitiveNgModuleMetadata(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13387:37)         在CompileMetadataResolver.getNgModuleMetadata(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13259:47)         在RuntimeCompiler._compileComponents(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:15845:51)         at RuntimeCompiler._compileModuleAndComponents(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:15769:41)         在RuntimeCompiler.compileModuleAsync(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:15746:25)         在PlatformRef _._ bootstrapModuleWithZone(http://localhost:4565/node_modules/@angular/core//bundles/core.umd.js:9991:29)         在PlatformRef_.bootstrapModule(http://localhost:4565/node_modules/@angular/core//bundles/core.umd.js:9984:25)     评估http://localhost:4565/dist/main.js错误加载   http://localhost:4565/dist/main.js;区域:;任务:Promise.then   ;值:错误:TypeError:无法读取null的属性“type”         在eval(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13673:45)         at Array.forEach(native)         at getTransitiveModules(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13672:17)         at CompileMetadataResolver._getTransitiveNgModuleMetadata(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13387:37)         在CompileMetadataResolver.getNgModuleMetadata(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13259:47)         在RuntimeCompiler._compileComponents(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:15845:51)         at RuntimeCompiler._compileModuleAndComponents(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:15769:41)         在RuntimeCompiler.compileModuleAsync(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:15746:25)         在PlatformRef _._ bootstrapModuleWithZone(http://localhost:4565/node_modules/@angular/core//bundles/core.umd.js:9991:29)         在PlatformRef_.bootstrapModule(http://localhost:4565/node_modules/@angular/core//bundles/core.umd.js:9984:25)     评估http://localhost:4565/dist/main.js错误加载   http://localhost:4565/dist/main.jsconsoleError @ zone.js:461_loop_1 @   zone.js:490drainMicroTaskQueue @ zone.js:494ZoneTask.invoke @   zone.js:426 zone.js:463错误:未捕获(在承诺中):错误:   TypeError:无法读取属性'type'的null(...)consoleError @   zone.js:463_loop_1 @ zone.js:490drainMicroTaskQueue @   zone.js:494ZoneTask.invoke @ zone.js:426

任何人都可以帮我解决此更新错误吗?我不明白它来自错误的导入?

  

zone.js:463错误:未捕获(在承诺中):错误:TypeError:不能   读取属性'type'为null         在eval(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13673:45)         at Array.forEach(native)         at getTransitiveModules(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13672:17)         at CompileMetadataResolver._getTransitiveNgModuleMetadata(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13387:37)         在CompileMetadataResolver.getNgModuleMetadata(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13259:47)         在RuntimeCompiler._compileComponents(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:15845:51)         at RuntimeCompiler._compileModuleAndComponents(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:15769:41)         在RuntimeCompiler.compileModuleAsync(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:15746:25)         在PlatformRef _._ bootstrapModuleWithZone(http://localhost:4565/node_modules/@angular/core//bundles/core.umd.js:9991:29)         在PlatformRef_.bootstrapModule(http://localhost:4565/node_modules/@angular/core//bundles/core.umd.js:9984:25)     评估http://localhost:4565/dist/main.js错误加载   http://localhost:4565/dist/main.js         在eval(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13673:45)         at Array.forEach(native)         at getTransitiveModules(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13672:17)         at CompileMetadataResolver._getTransitiveNgModuleMetadata(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13387:37)         在CompileMetadataResolver.getNgModuleMetadata(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:13259:47)         在RuntimeCompiler._compileComponents(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:15845:51)         at RuntimeCompiler._compileModuleAndComponents(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:15769:41)         在RuntimeCompiler.compileModuleAsync(http://localhost:4565/node_modules/@angular/compiler//bundles/compiler.umd.js:15746:25)         在PlatformRef _._ bootstrapModuleWithZone(http://localhost:4565/node_modules/@angular/core//bundles/core.umd.js:9991:29)         在PlatformRef_.bootstrapModule(http://localhost:4565/node_modules/@angular/core//bundles/core.umd.js:9984:25)     评估http://localhost:4565/dist/main.js错误加载   http://localhost:4565/dist/main.js       at resolvePromise(http://localhost:4565/node_modules/zone.js/dist/zone.js:538:32)       at resolvePromise(http://localhost:4565/node_modules/zone.js/dist/zone.js:523:18)       在http://localhost:4565/node_modules/zone.js/dist/zone.js:571:18       在ZoneDelegate.invokeTask(http://localhost:4565/node_modules/zone.js/dist/zone.js:356:38)       在Zone.runTask(http://localhost:4565/node_modules/zone.js/dist/zone.js:256:48)       在drainMicroTaskQueue(http://localhost:4565/node_modules/zone.js/dist/zone.js:474:36)       在XMLHttpRequest.ZoneTask.invoke(http://localhost:4565/node_modules/zone.js/dist/zone.js:426:22

1 个答案:

答案 0 :(得分:0)

如果没有看到代码,就无法说清楚。

但是rc5有一些重大变化。

阅读这篇文章。 https://www.barbarianmeetscoding.com/blog/2016/08/13/updating-your-angular-2-app-from-rc4-to-rc5-a-practical-guide/

除此之外,规格js中出现了一些错误。