Search code examples
swiftmacos-sierravapor

Vapor build failure


I am using Mac with 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.

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.


Solution

  • If you installed latest xcode and still getting error.

    Goto: xcode -> Preferences -> Locations -> Command Line Tool

    Change it to latest. Then check swift version. Then try vapor commands.