【发布时间】:2018-09-11 20:47:33
【问题描述】:
我尝试按照Angular with Dart 的教程进行操作。 在我进入导航章节之前,一切都很好。 当我使用 webstorm 和 chromium 运行项目时,我总是会收到此错误。 我也尝试运行solution repo,但我得到了同样的错误。 似乎这些包浏览器/角度等未加载。 也许webstorm有一些限制?!有趣的是它在第一次运行时偶尔会起作用,但是当我在浏览器中刷新页面时,错误总是会回来。
http://localhost:63342/toh-5-master/web/packages/browser/dart.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:63342/toh-5-master/web/packages/angular/angular.dart Failed to load resource: the server responded with a status of 404 (Not Found)
package:angular/angular.dart:1 An error occurred loading file: package:angular/angular.dart
http://localhost:63342/toh-5-master/web/packages/angular_router/angular_router.dart Failed to load resource: the server responded with a status of 404 (Not Found)
package:angular_router/angular_router.dart:1 An error occurred loading file: package:angular_router/angular_router.dart
http://localhost:63342/toh-5-master/web/packages/angular_tour_of_heroes/app_component.dart Failed to load resource: the server responded with a status of 404 (Not Found)
package:angular_tour_of_heroes/app_component.dart:1 An error occurred loading file: package:angular_tour_of_heroes/app_component.dart
编辑 上面的事情现在正在工作,因为我改成了这个 repo: github.com/angular-examples/toh-5/tree/5-dev 适用于 Dart 2。
现在我对新的 5-dev repo 有另一个问题。 这是我的酒吧服务控制台。它说 main.template.dart 丢失。 (我使用的是 Dart 版本 2.0.0-dev.44.0.)
有没有人可以解决这个问题?
Compiling angular_tour_of_heroes|web/main.dart...
[web] GET styles.css => (cached) angular_tour_of_heroes|web/styles.css
[Error from Dart2JS on angular_tour_of_heroes|web/main.dart]:
file:///C:/xampp/htdocs/flutterprojects/toh-5-5-dev/web/main.template.dart: Could not find asset angular_tour_of_heroes|web/main.template.dart.
[Info from Dart2JS]:
Took 0:00:03.911463 to compile angular_tour_of_heroes|web/main.dart.
Build completed with 1 errors.
[web] GET main.dart.js => Could not find asset angular_tour_of_heroes|web/main.dart.js.
[web] GET index.html => angular_tour_of_heroes|web/index.html
当我直接使用控制台运行它时,出现以下错误。
> 发布服务 --web-compiler=dartdevc
Build completed successfully
[web] GET => angular_tour_of_heroes|web/index.html
[web] GET styles.css => angular_tour_of_heroes|web/styles.css
Unable to find module for angular|lib/src/bootstrap/modules.template.dart
Unable to find module for angular|lib/src/bootstrap/modules.template.dart
Unable to find module for angular|lib/src/bootstrap/modules.template.dart
【问题讨论】:
标签: dart angular-dart