Error: No builds found for debug configuration

I am at page 28 of chapter 1 and am running into this error. How to proceed?vapor

@0xtim Any suggestions?

Found it myself. You must run vapor xcode -y
Sighs

Apologies for the delay - this usually means that the command line tools have overwritten what you need. Running xcode-select -s /Applications/Xcode.app should fix it

(You’ll get a better error message running swift build as well)

I have run into the same error as listed at the top:

Davids-MacBook-Air:HelloVapor davidreyes$ vapor run
Error: No builds found for debug configuration.

I have tried both command line suggestions:
Davids-MacBook-Air:HelloVapor davidreyes$ vapor xcode -y
Generating Xcode Project [Done]
Select the Run scheme to run.
Open Xcode project?
y/n> yes
Opening Xcode project…
Error: backgroundExecute(code: 1, error: “The file /Users/davidreyes/vapor/HelloVapor/*.xcodeproj does not exist.\n”, output: “”)

And again:
Davids-MacBook-Air:HelloVapor davidreyes$ xcode-select -s /Applications/Xcode.app
xcode-select: error: --switch must be run as root (e.g. sudo xcode-select --switch <xcode_folder_path>).

Can someone explain what these errors are trying to tell me, and what I should do to proceed?

@dreyes so the first error No builds found for debug configuration means that there are no binaries to run - you haven’t built the binary before attempting to run it. You need to do vapor build before vapor run (although swift run will do both).

However, you’ll need to fix the second error first. -switch must be run as root means you need super user permissions to execute the command. So if you follow the suggestion and prepend your command with sudo (Super User DO) then it should work.

Hope that helps!

Thank you so much for your help, @0xtim! Your suggestions fixed the problem.

Here are the steps that allowed the command to execute:

sudo xcode-select -s /Applications/Xcode.app
vapor build
vapor run

Though I am now able to see output in a browser window, I am unable to return to my command line prompt.

After running the above commands, Vapor responded with the following lines:

Davids-MacBook-Air:HelloVapor davidreyes$ vapor run
Running HelloVapor …
[ INFO ] Migrating ‘sqlite’ database (/Users/davidreyes/vapor/HelloVapor/.build/checkouts/fluent/Sources/Fluent/Migration/MigrationConfig.swift:69)
[ INFO ] Preparing migration ‘Todo’ (/Users/davidreyes/vapor/HelloVapor/.build/checkouts/fluent/Sources/Fluent/Migration/Migrations.swift:111)
[ INFO ] Migrations complete (/Users/davidreyes/vapor/HelloVapor/.build/checkouts/fluent/Sources/Fluent/Migration/MigrationConfig.swift:73)
Running default command: .build/debug/Run serve
Server starting on http://localhost:8080
[ ERROR ] Abort.404: Not Found (ApplicationResponder.swift:50)

Why am I unable to return to the command line prompt?
What should I do to cancel Vapor and allow me to return to a command line prompt?

The app is keeping the terminal input whilst it runs. To exit the app (or stop it) do CTRL+C

Yup, that worked. Thanks @0xtim for your patient assistance.

1 Like