简体   繁体   English

Angular.Dart教程错误

[英]Errors with Angular.Dart tutorials

Installed Google Dart 1.0. 安装了Google Dart 1.0。 Basically a Dart noob at this point... 此时基本上是Dart菜鸟...

angular.dart tutorial apps at - https://github.com/angular/angular.dart.tutorial Seems broken or I am doing something wrong. 在angular.dart教程应用- https://github.com/angular/angular.dart.tutorial好像折断或我做错了什么。

in chapter folders, file pubspec.yaml contains text: ../pubspec.yaml - which seems to be non yaml. 在章节文件夹中,文件pubspec.yaml包含文本: ../pubspec.yaml似乎不是yaml。 pub errors out with 发布错误

Pub get failed, [1] Error in pubspec.yaml: The pubspec must be a YAML mapping. 发布失败,[1] pubspec.yaml中的错误:pubspec必须是YAML映射。

There is a common pubspec.yaml in dir below chapter dirs, it contains legit yaml. 在目录dirs下的dir中有一个常见的pubspec.yaml,它包含合法的yaml。

Even after editing chapter project pubspec.yaml with "common" pubspec legit yaml content and doing pub get, chapter 03..06 demos have missing package references. 即使在编辑带有“公共” pubspec合法yaml内容的章项目pubspec.yaml并执行pub get之后,第03..06章的演示也缺少软件包引用。

Anyone who can tell me what I'm doing wrong appreciated. 任何可以告诉我我在做什么的人都表示赞赏。

There is a bug with the tutorial on Windows: https://github.com/angular/angular.dart.tutorial/issues/8 Windows上的教程存在错误: https//github.com/angular/angular.dart.tutorial/issues/8

which should be fixed soon. 应该尽快修复。

Having the same issue at present. 目前存在相同的问题。 Short-term solution appears to not be to edit yaml files/links, (if you have, its probably best to re-download the tutorial files from fresh) instead: open the main.dart files in each affected example, changes lines such as: 短期解决方案似乎不是编辑yaml文件/链接,(如果可能的话,最好是从全新的位置重新下载教程文件),而是:在每个受影响的示例中打开main.dart文件,更改诸如:

import 'package:angular_dart_demo/rating/rating_component.dart'; 导入'package:angular_dart_demo / rating / rating_component.dart';

to

import '../lib/rating/rating_component.dart'; 导入'../lib/rating/rating_component.dart';

(you should see the ~ underlines disappear when you type this) (键入时,您应该会看到〜下划线消失)

I think this has been due to some recent restructuring of the example files, since these were working until recently. 我认为这是由于示例文件最近进行了一些重组,因为这些文件一直有效到最近。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM