我正在尝试遵循此处的Dart Web教程https://webdev.dartlang.org/angular/tutorial/toh-pt5
为了确保我从正确的基础开始下载到H-4-master,模板从最后的chapter.It构建并运行良好,然后我按照指南移动和重命名应用程序组件,然后手动创建一个新的,但是在遵循“创建应用程序组件”之后,指南说明重新加载页面和应用程序应该可以工作,但是我得到了下面包含的错误。
它表明它没有正确地生成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
发布于 2018-09-26 08:06:02
您是否也重命名了组件文件?
如果是,则从其中包含该组件的文件生成template.dart文件。因此,它将遵循component.dart -> component.template.dart模式
https://stackoverflow.com/questions/52479690
复制相似问题