pub没有生成pubspec.lock文件

时间:2017-06-07 14:06:17

标签: dart dart-pub

我有一台新的2016款MacBook Pro 13英寸,我正试图让dart和dartium运行起来。但是,当我使用pubspec.yaml在目录中运行pub get时,我没有得到pubspec.lock文件或其他任何内容。

软件包声称正在下载,但是在最后一个软件包之后,我没有收到任何进一步的输出。

这是pub get

的输出
RMTMACSIERRA01:ui jacob.massengill$ pub get
Resolving dependencies... (10.3s) 
+ analyzer 0.25.2+1 (0.30.0+2 available)
+ angular 1.1.2+2
+ angular_ui 0.6.13
+ args 0.12.2+6 (0.13.7 available)
+ async 1.9.0 (1.13.3 available)
+ barback 0.15.2+7 (0.15.2+11 available)
+ browser 0.10.0+2
+ charcode 1.1.1
+ cli_util 0.0.1+2 (0.1.1 available)
+ code_transformers 0.2.9+3 (0.5.1+3 available)
+ collection 1.1.3 (1.14.1 available)
+ convert 1.1.0 (2.0.1 available)
+ crypto 0.9.2+1 (2.0.1 available)
+ csslib 0.13.7+1 (0.14.0 available)
+ dart_config 0.5.0
+ dart_style 0.2.1 (1.0.6 available)
+ dart_to_js_script_rewriter 1.0.1 (1.0.2 available)
+ di 3.3.5+1 (3.3.10 available)
+ glob 1.1.3
+ guinness 0.1.18
+ html 0.12.2+2 (0.13.2 available)
+ html5lib 0.12.1
+ http_multi_server 2.0.3
+ http_parser 2.2.1 (3.1.1 available)
+ initialize 0.6.1+2 (0.6.2+6 available)
+ intl 0.8.10+4 (0.15.0 available)
+ js 0.6.0 (0.6.1 available)
+ logging 0.11.3+1
+ matcher 0.12.0+2 (0.12.1+1 available)
+ meta 1.0.5
+ mime 0.9.3
+ mixpanel 1.0.0
+ mock 0.11.0+4 (0.12.0 available)
+ mockito 0.8.2 (2.0.2 available)
+ observe 0.13.1+3 (0.15.1 available)
+ package_config 0.1.5 (1.0.1 available)
+ path 1.4.1
+ perf_api 0.0.9 (0.1.0 available)
+ petitparser 1.5.3 (1.5.4 available)
+ plugin 0.1.0 (0.2.0 available)
+ pool 1.3.0 (1.3.1 available)
+ pub_semver 1.3.2
+ quiver 0.21.4 (0.25.0 available)
+ route_hierarchical 0.6.2 (0.7.0 available)
+ shelf 0.6.5 (0.6.7+2 available)
+ shelf_static 0.2.4
+ shelf_web_socket 0.0.1+5 (0.2.1 available)
+ smoke 0.3.5 (0.3.6+3 available)
+ source_map_stack_trace 1.0.4 (1.1.4 available)
+ source_maps 0.10.4
+ source_span 1.4.0
+ stack_trace 1.7.3
+ stream_channel 1.3.1 (1.6.1 available)
+ string_scanner 0.1.5 (1.0.2 available)
+ test 0.12.7 (0.12.21 available)
+ typed_data 1.1.3
+ unittest 0.11.7 (0.12.4+1 available)
+ utf 0.9.0+3
+ uuid 0.5.1 (0.5.3 available)
+ watcher 0.9.7 (0.9.7+3 available)
+ web_components 0.11.4 (0.12.5 available)
+ webdriver 1.0.0 (1.2.3 available)
+ when 0.2.0
+ which 0.1.3
+ xml 2.2.3 (2.5.0 available)
+ xml2json 2.0.6 (2.0.8 available)
+ yaml 2.1.10 (2.1.12 available)
Downloading angular 1.1.2+2...
Downloading angular_ui 0.6.13...
Downloading args 0.12.2+6...
Downloading browser 0.10.0+2...
Downloading dart_config 0.5.0...
Downloading dart_to_js_script_rewriter 1.0.1...
Downloading glob 1.1.3...
Downloading guinness 0.1.18...
Downloading js 0.6.0...
Downloading mixpanel 1.0.0...
Downloading mock 0.11.0+4...
Downloading mockito 0.8.2...
Downloading quiver 0.21.4...
Downloading test 0.12.7...
Downloading uuid 0.5.1...
Downloading web_components 0.11.4...
Downloading webdriver 1.0.0...
Downloading xml2json 2.0.6...
Downloading yaml 2.1.10...
Downloading charcode 1.1.1...
Downloading html 0.12.2+2...
Downloading shelf_web_socket 0.0.1+5...
Downloading perf_api 0.0.9...
Downloading pub_semver 1.3.2...
Downloading source_map_stack_trace 1.0.4...
Downloading pool 1.3.0...
Downloading http_multi_server 2.0.3...
Downloading string_scanner 0.1.5...
Downloading source_span 1.4.0...
Downloading http_parser 2.2.1...
Downloading stream_channel 1.3.1...
Downloading route_hierarchical 0.6.2...
Downloading shelf_static 0.2.4...
Downloading convert 1.1.0...
Downloading typed_data 1.1.3...
Downloading matcher 0.12.0+2...
Downloading collection 1.1.3...
Downloading utf 0.9.0+3...
Downloading initialize 0.6.1+2...
Downloading async 1.9.0...
Downloading xml 2.2.3...
Downloading dart_style 0.2.1...
Downloading petitparser 1.5.3...
Downloading mime 0.9.3...
Downloading shelf 0.6.5...
Downloading code_transformers 0.2.9+3...
Downloading cli_util 0.0.1+2...
Downloading which 0.1.3...
Downloading when 0.2.0...
Downloading path 1.4.1...
Downloading crypto 0.9.2+1...
Downloading di 3.3.5+1...
Downloading barback 0.15.2+7...
Downloading html5lib 0.12.1...
Downloading observe 0.13.1+3...
Downloading smoke 0.3.5...
Downloading source_maps 0.10.4...
Downloading logging 0.11.3+1...
Downloading csslib 0.13.7+1...
Downloading stack_trace 1.7.3...
Downloading intl 0.8.10+4...
Downloading meta 1.0.5...
Downloading unittest 0.11.7...
Downloading analyzer 0.25.2+1...
Downloading plugin 0.1.0...
Downloading package_config 0.1.5...
Downloading watcher 0.9.7...

然后当我尝试运行pub buildpub serve时,

no pubspec.lock file found, please run "pub get" first

我通过自制软件安装了dart 1.15.0(我的团队使用的版本)。

编辑:我的主管克隆了我的分叉仓库,能够毫无问题地执行pub getpub serve,因此pubspec.yaml文件或repo似乎没有问题本身。

1 个答案:

答案 0 :(得分:2)

在我的防火墙设置中将pub添加到允许的连接并执行我的计算机的硬重启后,此问题已得到解决。

我认为这个问题是由于pub因防火墙而导致连接超时,并且没有警告而失败。