2017-05-26 65 views
0

我在本地有一个带AngluarDart的飞镖。飞镖编译时出错

的Ubuntu 16.04.2 DartSdk v1.23.0

“酒吧服务” 似乎做工精细

$ pub serve 
Loading source assets... 
Loading angular2, dart_to_js_script_rewriter and dart_sass_transformer 
transformers... (3.4s) 
Serving xxx web on http://localhost:8080 
Build completed successfully 

但是当我尝试到网上加载到我的浏览器我得到这个错误:

[web] GET Served 3 cached assets. 
[Info from Dart2JS]: 
Compiling xxx|web/main.dart... 
[Error from Dart2JS]: 
web/main.dart: 
The compiler crashed when compiling this element. 
The compiler is broken. 

When compiling the above element, the compiler crashed. 
It is not possible to tell if this is caused by a problem in your program or not. 
Regardless, the compiler should not crash. 

The Dart team would greatly appreciate if you would take a moment to 
report this problem at http://dartbug.com/new. 

Please include the following information: 

* the name and version of your operating system, 

* the Dart SDK build number (build number could not be determined), and 

* the entire message you see here (including the full stack trace 
below as well as the source location above). 

Build error: 
Transform Dart2JS on xxx|web/main.dart threw error: The getter 'uses' 
was called on null. 
Receiver: null 
Tried calling: uses 
dart:core            
Object.noSuchMethod 
package:compiler_unsupported/src/dump_info.dart 576  
DumpInfoTask.dumpInfoJson 
package:compiler_unsupported/src/dump_info.dart 536  
DumpInfoTask.dumpInfo.<fn> 
package:compiler_unsupported/src/common/tasks.dart 63 
CompilerTask.measure 
package:compiler_unsupported/src/dump_info.dart 533  
DumpInfoTask.dumpInfo 
package:compiler_unsupported/src/compiler.dart 703  
Compiler.compileLoadedLibraries.<fn> 
package:compiler_unsupported/src/common/tasks.dart 176 
CompilerTask.measureSubtask 
package:compiler_unsupported/src/compiler.dart 582  
Compiler.compileLoadedLibraries 
package:compiler_unsupported/src/compiler.dart 471  
Compiler.runInternal 
===== asynchronous gap =========================== 
package:compiler_unsupported/src/compiler.dart 310  Compiler.run. 
<fn>.<fn> 
dart:async            
Future.Future.sync 
package:compiler_unsupported/src/compiler.dart 310  Compiler.run. 
<fn> 
package:compiler_unsupported/src/common/tasks.dart 176 
CompilerTask.measureSubtask 
package:compiler_unsupported/src/compiler.dart 307  Compiler.run 
package:compiler_unsupported/src/apiimpl.dart 245  CompilerImpl.run.<fn>.<fn> 

Build completed with 2 errors. 
[web] GET main.dart.js → Could not find asset xxx|web/main.dart.js. 
[web] GET favicon.ico → (cached) xxx|web/favicon.ico 

我试图重新获得DartSDK,修改了PATH ...

w ^帽子可以是问题吗?

+0

添加您的dart代码部分 –

回答

0

我解决了降级Dart SDK版本的问题。 从1.23.0到1.21.1

现在,complilator的工作没有问题。