我无法添加包mdl https://pub.dartlang.org/packages/mdl 使用
进行pub缓存 command pub cache add mdl
或使用依赖
dependencies:
mdl: "^1.1.2"
在我的pubspec.yaml文件中。
作者说这是一个Windows问题,因为它的工作原理是在Linux和iOS上设计的。
我在Windows 8.1 x64上使用当前的WebStorm。这是我第一次遇到这样的问题。
使用命令行
pub --trace cache add mdl
我收到以下跟踪
J:\workspace\epimss\dart\epimss_app>pub --trace cache add mdl
Downloading mdl 1.1.2...
Timed out after 30.0s while downloading https://pub.dartlang.org/packages/mdl/versions/1.1.2.tar.gz.
This is likely a transient error. Please try again later.
package:pub/src/io.dart 859 timeout.<fn>
===== asynchronous gap ===========================
dart:async Timer.Timer
package:pub/src/io.dart 848 timeout
package:pub/src/source/hosted.dart 194 HostedSource._download.<fn>.<fn>
===== asynchronous gap ===========================
dart:async _Future.then
package:pub/src/source/hosted.dart 193 HostedSource._download.<fn>
dart:async Future.Future.sync
package:pub/src/source/hosted.dart 184 HostedSource._download
package:pub/src/source/hosted.dart 93 HostedSource.downloadToSystemCache.<fn>
===== asynchronous gap ===========================
dart:async _Future.then
package:pub/src/source/hosted.dart 86 HostedSource.downloadToSystemCache
package:pub/src/command/cache_add.dart 81 CacheAddCommand.run.<async>.downloadVersion.<async>
===== asynchronous gap ===========================
dart:async _Future.then
package:pub/src/command/cache_add.dart 73 CacheAddCommand.run.<async>.downloadVersion.<async>
===== asynchronous gap ===========================
package:pub CacheAddCommand.run.<async>.downloadVersion
package:pub/src/command/cache_add.dart 91 CacheAddCommand.run.<async>
===== asynchronous gap ===========================
dart:async _Future.then
package:pub/src/command/cache_add.dart 62 CacheAddCommand.run.<async>
===== asynchronous gap ===========================
dart:async Future.Future.microtask
package:pub/src/command/cache_add.dart CacheAddCommand.run
package:args/command_runner.dart 178 CommandRunner.runCommand.<fn>
dart:async Future.Future.sync
package:args/command_runner.dart 131 CommandRunner.runCommand
package:pub/src/command_runner.dart 122 PubCommandRunner.runCommand.<async>.<fn>
dart:async Future.Future.sync
package:pub/src/utils.dart 103 captureErrors.<fn>
package:stack_trace Chain.capture
package:pub/src/utils.dart 117 captureErrors
package:pub/src/command_runner.dart 122 PubCommandRunner.runCommand.<async>
---- Log transcript ----
FINE: Pub 1.12.0-dev.3.1
IO : Spawning "cmd /c ver" in J:\workspace\epimss\dart\epimss_app\.
IO : Finished ver. Exit code 0.
| stdout:
| |
| | Microsoft Windows [Version 6.3.9600]
| Nothing output on stderr.
IO : Get versions from https://pub.dartlang.org/api/packages/mdl.
FINE: HTTP GET https://pub.dartlang.org/api/packages/mdl
| Accept: application/vnd.pub.v2+json
| user-agent: Dart pub 1.12.0-dev.3.1
FINE: HTTP response 200 OK for GET https://pub.dartlang.org/api/packages/mdl
| took 0:00:00.418239
| cache-control: private
| transfer-encoding: chunked
| accept-ranges: none
| date: Tue, 21 Jul 2015 10:46:10 GMT
| vary: Accept-Encoding
| content-type: application/json
| x-frame-options: SAMEORIGIN
| via: infb126:25935
| x-xss-protection: 1; mode=block
| x-content-type-options: nosniff
| server: Google Frontend
IO : Get package from https://pub.dartlang.org/packages/mdl/versions/1.1.2.tar.gz.
MSG : Downloading mdl 1.1.2...
IO : Created temp directory C:\Users\st.clair.clarke\AppData\Roaming\Pub\Cache\_temp\dirb0c89391-2f95-11e5-80a7-3085a98f2ffb
FINE: HTTP GET https://pub.dartlang.org/packages/mdl/versions/1.1.2.tar.gz
| user-agent: Dart pub 1.12.0-dev.3.1
FINE: HTTP response 200 OK for GET https://pub.dartlang.org/packages/mdl/versions/1.1.2.tar.gz
| took 0:00:00.535308
| x-goog-storage-class: STANDARD
| last-modified: Mon, 20 Jul 2015 21:01:24 GMT
| cache-control: public, max-age=3600
| date: Tue, 21 Jul 2015 10:46:10 GMT
| vary: Accept-Encoding
| x-goog-stored-content-length: 32419840
| x-guploader-uploadid: AEnB2UrdnbZJiDQihBiYH0s_eE3L2Q7ZmBDJJtJYZsQZFxtFlqWfruJmKw6OcdIxPVkru0t5vCVii9thOYsI0NLfl7O19rS9rA
| x-goog-hash: crc32c=QJe0BQ==,md5=u5fMJcctgRWlUW3ycRmg2A==
| content-type: application/octet-stream
| x-goog-generation: 1437426084774000
| server: UploadServer
| alternate-protocol: 443:quic,p=1
| accept-ranges: bytes
| content-length: 32419840
| x-goog-stored-content-encoding: identity
| etag: "bb97cc25c72d8115a5516df27119a0d8"
| x-goog-metageneration: 2
| expires: Tue, 21 Jul 2015 11:46:10 GMT
FINE: Extracting .tar.gz stream to C:\Users\st.clair.clarke\AppData\Roaming\Pub\Cache\_temp\dirb0c89391-2f95-11e5-80a7-3085a98f2ffb.
IO : Created temp directory C:\Users\STCLAI~1.CLA\AppData\Local\Temp\pub_b0c89392-2f95-11e5-80a7-3085a98f2ffb
IO : Creating C:\Users\STCLAI~1.CLA\AppData\Local\Temp\pub_b0c89392-2f95-11e5-80a7-3085a98f2ffb\data.tar.gz from stream.
FINE: Created C:\Users\STCLAI~1.CLA\AppData\Local\Temp\pub_b0c89392-2f95-11e5-80a7-3085a98f2ffb\data.tar.gz from stream.
IO : Spawning "J:\dart\dart-sdk\lib\_internal\pub\asset\7zip\7za.exe e data.tar.gz" in C:\Users\STCLAI~1.CLA\AppData\Local\Temp\pub_b0c89392-2f95-11e5-80a7-3085a98f2ffb
IO : Finished J:\dart\dart-sdk\lib\_internal\pub\asset\7zip\7za.exe. Exit code 0.
| stdout:
| |
| | 7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
| |
| | Processing archive: data.tar.gz
| |
| | Extracting data.tar
| |
| | Everything is Ok
| |
| | Size: 44359680
| | Compressed: 32419840
| Nothing output on stderr.
IO : Spawning "J:\dart\dart-sdk\lib\_internal\pub\asset\7zip\7za.exe x C:\Users\STCLAI~1.CLA\AppData\Local\Temp\pub_b0c89392-2f95-11e5-80a7-3085a98f2ffb\data.tar" in C:\Users\st.clair.clarke\AppData\Roaming\Pub\Cache\_temp\dirb0c89391-2f95-11e5-80a7-3085a98f2ff
b
ERR : Timed out after 30.0s while downloading https://pub.dartlang.org/packages/mdl/versions/1.1.2.tar.gz.
| This is likely a transient error. Please try again later.
FINE: Exception type: TimeoutException
ERR : package:pub/src/io.dart 859 timeout.<fn>
| ===== asynchronous gap ===========================
| dart:async Timer.Timer
| package:pub/src/io.dart 848 timeout
| package:pub/src/source/hosted.dart 194 HostedSource._download.<fn>.<fn>
| ===== asynchronous gap ===========================
| dart:async _Future.then
| package:pub/src/source/hosted.dart 193 HostedSource._download.<fn>
| dart:async Future.Future.sync
| package:pub/src/source/hosted.dart 184 HostedSource._download
| package:pub/src/source/hosted.dart 93 HostedSource.downloadToSystemCache.<fn>
| ===== asynchronous gap ===========================
| dart:async _Future.then
| package:pub/src/source/hosted.dart 86 HostedSource.downloadToSystemCache
| package:pub/src/command/cache_add.dart 81 CacheAddCommand.run.<async>.downloadVersion.<async>
| ===== asynchronous gap ===========================
| dart:async _Future.then
| package:pub/src/command/cache_add.dart 73 CacheAddCommand.run.<async>.downloadVersion.<async>
| ===== asynchronous gap ===========================
| package:pub CacheAddCommand.run.<async>.downloadVersion
| package:pub/src/command/cache_add.dart 91 CacheAddCommand.run.<async>
| ===== asynchronous gap ===========================
| dart:async _Future.then
| package:pub/src/command/cache_add.dart 62 CacheAddCommand.run.<async>
| ===== asynchronous gap ===========================
| dart:async Future.Future.microtask
| package:pub/src/command/cache_add.dart CacheAddCommand.run
| package:args/command_runner.dart 178 CommandRunner.runCommand.<fn>
| dart:async Future.Future.sync
| package:args/command_runner.dart 131 CommandRunner.runCommand
| package:pub/src/command_runner.dart 122 PubCommandRunner.runCommand.<async>.<fn>
| dart:async Future.Future.sync
| package:pub/src/utils.dart 103 captureErrors.<fn>
| package:stack_trace Chain.capture
| package:pub/src/utils.dart 117 captureErrors
| package:pub/src/command_runner.dart 122 PubCommandRunner.runCommand.<async>
---- End log transcript ----