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



我正在努力学习Dart Web教程https://webdev.dartlang.org/angular/tutorial/toh-pt5

为了确保我从正确的基础上开始,我下载了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

您是否也重命名了组件文件?

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

相关内容

最新更新