简体   繁体   English

蒸汽构建失败

[英]Vapor build failure

I am using Mac with Sierra OS (10.12.5). 我正在使用Mac和Sierra OS(10.12.5)。 I Installed Vapor using home-brew. 我使用自酿啤酒安装了蒸汽。 If I tried to run command 'vapor build' in terminal it shows following error. 如果我试图在终端中运行命令'steam build',则显示以下错误。

No .build folder, fetch may take a while...
Fetching Dependencies [  •                      ]
Error: backgroundExecute(code: 1, error: "swift-package: error: unknown command: --enable-prefetching\n", output: "")

Please help me. 请帮我。

If you installed latest xcode and still getting error. 如果您安装了最新的xcode但仍然出错。

Goto: xcode -> Preferences -> Locations -> Command Line Tool 转到:xcode - >首选项 - >位置 - >命令行工具

Change it to latest. 将其更改为最新。 Then check swift version. 然后检查swift版本。 Then try vapor commands. 然后尝试蒸汽命令。

Looks like you are running Swift 3.0, where as the toolbox (and Vapor 2) required Swift 3.1. 看起来你正在运行Swift 3.0,其中工具箱(和Vapor 2)需要Swift 3.1。

Upgrade Swift to 3.1 (by upgrading Xcode usually) and it should work. 将Swift升级到3.1(通常通过升级Xcode),它应该可以工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM