Dart editor: expected url

2019-06-25 13:15发布

问题:

I have this error :

  Internal error: 'http://127.0.0.1:3030/Motion/bin/csscode.dart': error: line 2 pos 6: url expected
part of dart.motion;

This part is next motion.dart library; what is the problem ?

I have trouble getting the Dart editor find the files that are part of the libraries, and the libraries themselves. Anyone know where to find detailed information about this topic?

Thanks !

回答1:

Notice that this error could happen when a "part of file" is loaded instead of its library.

For example, from a <script> tag in a custom-element/page:

<script type="application/dart" src="my-part-library.dart"></script><!--won't works-->
<script type="application/dart" src="TheLibrary.dart"></script><!--will works-->


回答2:

I had a similar problem and it turned out to be an issue with file encoding.



标签: dart