我已按照setting up web_components for DART上的指示进行操作。该页面中的以下代码片段给我带来了问题:
import 'package:web_components/component_build.dart';
import 'dart:io';
void main() {
build(new Options().arguments, ['web/app.html']);
}
当我尝试运行时,这是我收到的错误:
dart --enable-checked-mode --package-root=C:\Users\John Jelinek\dart\ build.dart
Unable to open file: C:\Users\John Jelinek\dart\web_components/component_build.dart'file:///C:/Users/John Jelinek/Documents/dart/webComponents/build.dart': Error: line 1 pos 1: library handler failed import 'package:web_components/component_build.dart'; ^
我不知道为什么当项目位于
C:\Users\John Jelinek\dart
中时,为什么要尝试在C:\Users\John Jelinek\Documents\dart
中找到引用。顺便说一句,我使用的是Windows 7 Home Premium 64位。确保我的发布包引用适当位置的最佳方法是什么?注意:我找到了someone else having similar problems,但是这些答案对我都不起作用。
最佳答案
查看以下说明,看看它们是否可以解决您的问题:
http://blog.sethladd.com/2012/11/your-first-web-component-with-dart.html
关于dart - 在DART应用中找不到发布包引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13517294/