AngularDart例程缺少导入

时间:2019-03-07 21:12:20

标签: dart angular-dart angular-dart-routing

在无法路由工作之后,我从字面上只是从routing tutorial复制了代码,但是在运行webdev serve时仍然遇到这些错误:

[INFO] Setting up file watchers completed, took 26ms
[INFO] Waiting for all file watchers to be ready completed, took 201ms
[INFO] Reading cached asset graph completed, took 447ms
[INFO] Checking for updates since last build completed, took 718ms
[INFO] Running build completed, took 375ms
[INFO] Caching finalized dependency graph completed, took 296ms
[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 'package:project_fit_cms/app_component.template.dart' as ng;` from project_fit_cms|test/app_test.dart at 5: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 'package:project_fit_cms/app_component.template.dart' as _ref3;` from project_fit_cms|web/main.template.dart at 10:1
`import 'package:project_fit_cms/app_component.template.dart' as ng;` from project_fit_cms|web/main.dart at 2:1


[SEVERE] angular on lib/app_component.dart (cached):
Compiling @Component-annotated class "AppComponent" failed.

Try the following when diagnosing the problem:
  * Check your IDE or with the dartanalyzer for errors or warnings
  * Check your "import" statements for missing or incorrect URLs

If you are still stuck, file an issue and include this error message:
https://github.com/dart-lang/angular/issues/new

line 20, column 13 of asset:project_fit_cms/lib/app_component.dart: Invalid constant value.
  ╷
1 │ RoutePaths
  │ ^^^^^^^^^^
  ╵


[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 'package:project_fit_cms/app_component.template.dart' as ng;` from project_fit_cms|test/app_test.dart at 5:1


[SEVERE] Failed after 698ms

任何想法可能出什么问题吗?

(忽略此内容,我只需要一些其他文本,以便stackoverflow可以将其发布。)

0 个答案:

没有答案