Dart编辑器:原始示例Web应用程序(使用聚合物):编译错误

时间:2014-02-19 07:33:50

标签: dart dart-polymer dart-pub

我已安装版本: Dart Editor版本1.1.3.release(STABLE) Dart SDK版本1.1.3 我使用聚合物库创建了一个新的Web应用程序。该应用程序是带来编辑器的原始示例:clickcounter。我没有添加或删除任何内容。应用程序正常运行没有错误。但是在尝试编译时,会出现很多错误。我遵循了dartlang.org中给出的建议。    因此,不编译带来编辑器的原始示例?有人有线索吗? 你可以自己试试。 这是OUTPUT中显示的错误列表:

--- 19-feb-2014 7:23:26 Running dart2js... ---
E:\dart\dart-sdk\bin\dart2js.bat --out=E:\Proyectos DART\carreta\PruebaPolymer\build.dart.js E:\Proyectos DART\carreta\PruebaPolymer\build.dart
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/builder.dart:85:8: Error: Library not found 'dart:io'.
import 'dart:io';
       ^^^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/linter.dart:11:8: Error: Library not found 'dart:io'.
import 'dart:io';
       ^^^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/barback/src/asset.dart:8:8: Error: Library not found 'dart:io'.
import 'dart:io';
       ^^^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/barback/src/file_pool.dart:9:8: Error: Library not found 'dart:io'.
import 'dart:io';
       ^^^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:13:8: Error: Library not found 'dart:io'.
import 'dart:io';
       ^^^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/yaml/src/parser.dart:5:9: Warning: Duplicated library name 'parser'.
library parser;
        ^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/html5lib/parser.dart:16:9: Warning: Duplicated library name 'parser'.
library parser;
        ^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/yaml/src/utils.dart:5:9: Warning: Duplicated library name 'utils'.
library utils;
        ^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/html5lib/src/utils.dart:2:9: Warning: Duplicated library name 'utils'.
library utils;
        ^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:221:19: Warning: Cannot resolve 'Directory'.
    var dir = new Directory(options.outDir);
                  ^^^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:276:22: Warning: Cannot resolve 'Link'.
      var link = new Link(linkPath);
                     ^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:278:26: Warning: Cannot resolve 'Platform'.
        var targetPath = Platform.operatingSystem == 'windows'
                         ^^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:332:32: Warning: Cannot resolve 'File'.
  return asset.read().pipe(new File(filepath).openWrite());
                               ^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:310:7: Warning: Cannot resolve 'Directory'.
  new Directory(dirpath).createSync(recursive: true);
      ^^^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:326:14: Warning: Cannot resolve 'File'.
  return new File(inpath).openRead().pipe(new File(outpath).openWrite());
             ^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:326:47: Warning: Cannot resolve 'File'.
  return new File(inpath).openRead().pipe(new File(outpath).openWrite());
                                              ^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:131:17: Warning: Cannot resolve 'Directory'.
  var dir = new Directory(path.join(packageDir, subDir));
                ^^^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:134:26: Warning: Cannot resolve type 'File'.
      .where((f) => f is File)
                         ^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:195:5: Warning: Cannot resolve 'exit'.
    exit(1);
    ^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:201:7: Warning: Cannot resolve 'exit'.
      exit(1);
      ^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:366:19: Warning: Cannot resolve 'stdioType'.
  var useColors = stdioType(stdout) == StdioType.TERMINAL;
                  ^^^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:366:29: Warning: Cannot resolve 'stdout'.
  var useColors = stdioType(stdout) == StdioType.TERMINAL;
                            ^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:366:40: Warning: Cannot resolve 'StdioType'.
  var useColors = stdioType(stdout) == StdioType.TERMINAL;
                                       ^^^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/barback/src/asset.dart:27:38: Warning: Cannot resolve type 'File'.
  factory Asset.fromFile(AssetId id, File file) =>
                                     ^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/barback/src/file_pool.dart:38:30: Warning: Cannot resolve 'File'.
      return Chain.track(new File(path).openRead()).transform(
                             ^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/barback/src/file_pool.dart:58:23: Warning: Cannot resolve 'BytesBuilder'.
    var builder = new BytesBuilder();
                      ^^^^^^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:99:18: Warning: Cannot resolve 'Platform'.
  var dartExec = Platform.executable;
                 ^^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:102:31: Warning: Cannot resolve 'Platform'.
  var pub = path.join(sdkDir, Platform.isWindows ? 'pub.bat' : 'pub');
                              ^^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:103:16: Warning: Cannot resolve 'Process'.
  var result = Process.runSync(pub, ['list-package-dirs']);
               ^^^^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:108:5: Warning: Cannot resolve 'exit'.
    exit(result.exitCode);
    ^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/src/build/runner.dart:82:21: Warning: Cannot resolve 'File'.
  var pubspec = new File(
                    ^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/builder.dart:323:5: Warning: Cannot resolve 'exit'.
    exit(1);
    ^^^^
/E:/Proyectos DART/carreta/PruebaPolymer/packages/polymer/builder.dart:328:5: Warning: Cannot resolve 'exit'.
    exit(0);
    ^^^^
Error: Compilation failed.

我找不到错误。一个想法??

1 个答案:

答案 0 :(得分:1)

我只是尝试过并且没有任何错误和警告。 可能是你的包(依赖项)有问题。 您可以尝试pub getpub upgrade(来自pubspec.yaml上下文菜单)并在显示错误时发布输出。