LoginSignup
4
1

More than 3 years have passed since last update.

vapor xcode実行ができなくてハマった件

Last updated at Posted at 2019-05-11

下記の記事を参考にVaporでサーバーサイドSwiftの環境構築を行った時に、以下のエラーが出てハマった話。
VaporでサーバーサイドSwiftを試してみた

結果から書くと、プロジェクト内のcloud.ymlで定義していたswift_versionとインストールされているswiftのバージョンの不一致が原因だった。

cloud.yml
swift_version: "4.1.0"

以下のコマンドでインストールされているswiftのバージョン確認

terminal
$ swift -version

※自分の場合swift_version: "5.0.1"に修正して、再度vapor xcodeを実行したら成功した。

cloud.yml
# swift_version: "4.1.0"
swift_version: "5.0.1"
terminal
$ vapor xcode

これで通った!


以下、出力されたエラー↓

terminal
$ vapor xcode
Generating Xcode Project [Failed]
/Users/~/Hello: error: manifest parse error(s):
<module-includes>:5:9: note: in file included from <module-includes>:5:
¥#import "copyfile.h"
        ^

~省略~

<unknown>:0: error: could not build Objective-C module 'Darwin'
4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1