【发布时间】:2018-09-24 12:42:41
【问题描述】:
我正在尝试在 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
【问题讨论】:
-
尝试删除
.dart_tool并仔细检查您的模板路径
标签: dart angular-dart