我一直在盯着Dart好一阵子,想尝试一下在工作中开发一个新的Web应用程序。
不幸的是,我和我的同事都遇到了一些挫折。
首先,没有一个样本可以直接使用。打开示例将立即在“输出”选项卡中显示此示例:
--- 07-Nov-2013 16:50:02 Running pub get ... --- Pub get failed, [1] Resolving dependencies...Failed NSS_Init call.
This is an unexpected error. Please run
pub --trace 'get'
and include the results in a bug report on http://dartbug.com/new.
** Warning: Application may fail to run since packages did not get installed.Try running pub get again. **
尝试启动任何更简单的示例(没有Polymer)将失败,并显示以下消息:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:3030/solar/web/packages/browser/dart.js
手动将
dart.js
文件添加到项目中并更改路径将解决此问题。但是,任何需要使用Pub软件包管理器的操作都会失败,并显示
Failed NSS_Init call.
消息,如上所示。盯着Dart时,还有其他人遇到过这些问题吗?有任何提示或建议吗?
编辑:
我正在使用Windows 8,并下载了64位Dart Editor文件。
编辑2:
这是
--trace
标志的输出(它与pub get --trace
一起运行,而不是如上面的错误消息中所示的pub --trace 'get'
运行...):> pub get --trace
Failed NSS_Init call.
---- Log transcript ----
FINE: Pub 0.8.10+3.r29803
IO : Spawning cmd /c ver
IO : Finished ver. Exit code 0.stdout:Microsoft Windows [Version 6.2.9200]Nothi
ng output on stderr.
SLVR: Solving dependencies:
| - browser any from hosted (browser)
IO : Get versions from https://pub.dartlang.org/api/packages/browser.
SLVR: BacktrackingSolver took 0:00:00.047007 seconds.
| - Requested 1 version lists
| - Looked up 0 cached version lists
| - Requested 0 pubspecs
| - Looked up 1 cached pubspecs
|
MSG : Resolving dependencies...
FINE: Clean up system cache temp directory C:\Users\myusername\AppData\Roaming\Pub\
Cache\_temp.
ERR : Failed NSS_Init call.
---- End log transcript ----
最佳答案
该问题似乎源于Dart SDK中使用的第三方库(NSS)中处理安装路径中的非ASCII字符的方式。
在此处查看错误报告和有关此问题的更新:
http://code.google.com/p/dart/issues/detail?id=15364
关于dart - Dart入门和使用Dart编辑器时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19842419/