Dart Web教程问题重新生成应用程序组件

时间:2018-09-24 12:42:42

标签: dart angular-dart

我正在尝试在https://webdev.dartlang.org/angular/tutorial/toh-pt5

上关注Dart Web教程。

为确保我从正确的基础开始下载上一章末尾的模板toh-4-master,它可以正常运行,然后按照指南移动并重命名应用程序组件,然后创建手动创建一个新程序,但是在遵循“创建应用程序组件”之后,该指南指出重新加载页面并且该应用程序应该可以运行,但是我收到了下面的错误。

这表明它没有正确生成app_component.template文件,关于如何调试此文件的任何想法?

SEVERE] build_web_compilers|entrypoint on test/app_test.dart (cached):
Unable to find modules for some sources, this is usually the result of either a
bad import, a missing dependency in a package (or possibly a dev_dependency
needs to move to a real dependency), or a build failure (if importing a
generated file).

Please check the following imports:

import 'src/hero_list_component.template.dart' as _ref1; from angular_tour_of_heroes|lib/app_component.template.dart at 13:1

[SEVERE] build_web_compilers|entrypoint on web/main.dart (cached):
Unable to find modules for some sources, this is usually the result of either a
bad import, a missing dependency in a package (or possibly a dev_dependency
needs to move to a real dependency), or a build failure (if importing a
generated file).

Please check the following imports:

import 'src/hero_list_component.template.dart' as _ref1; from angular_tour_of_heroes|lib/app_component.template.dart at 13:1

[SEVERE] build_web_compilers|entrypoint on test/app_test.dart.browser_test.dart (cached):
Unable to find modules for some sources, this is usually the result of either a
bad import, a missing dependency in a package (or possibly a dev_dependency
needs to move to a real dependency), or a build failure (if importing a
generated file).

Please check the following imports:

import 'src/hero_list_component.template.dart' as _ref1; from angular_tour_of_heroes|lib/app_component.template.dart at 13:1

[SEVERE] Failed after 943ms
Serving web on http://localhost:8080
Serving test on http://localhost:8080

1 个答案:

答案 0 :(得分:0)

您也重命名了组件文件吗?

如果是,则从其中包含组件的文件生成template.dart文件。因此它将遵循模式component.dart-> component.template.dart