Upgraded fly CLI version: error "the config for your app is missing an app name"

I upgrade the Fly CLI to

flyctl v0.1.8 linux/amd64 Commit: 8c7a3494a027b7ebfe503a516d0080c5ef8080e1 BuildDate: 2023-05-18T17:26:53Z

And now I am getting an error:

the config for your app is missing an app name, add an app_name field to the fly.toml file or specify with the -a flag`

I am running fly deploy like so:

fly deploy --local-only \
    --config ./path/to/fly.staging.toml \
    --dockerfile ./path/to/Dockerfile

Importantly, the TOML file and the Dockerfile are in a child directory of my current working directory and my TOML file is called fly.staging.toml instead of fly.toml.

I do have this section at the top of my TOML file:

app = "nextjs-staging"
# just added this
app_name = "nextjs-staging"

Why am I getting this “the config for your app is missing an app name” error?

The deploy command you’ve listed should work as-is. (Was the same setup and command working before?)

What that error is really saying (I think) is that it doesn’t know the name of the app you’re trying to deploy, so that means it can’t find the TOML to get the name. Although, it should be okay to rename fly.toml and provide a path like you have done.

You’ll see this error if you’re not in right directory relative to the path, like if you inadvertently tried to run it from within /path/to/ (per your example).

If that’s not the problem, you could try adding -a nextjs-staging to the deploy command, and then see if that works or if you get a different error re: the config.

Thanks for the reply. After some more digging around, I had a small bug in my config generator that coincided with when I upgraded the Fly CLI tool… So the problem was entirely mine. Sorry for the rubber ducky debugging!

1 Like

I learned something! And we’re fixing that error message in the next flyctl update. There’s no such field app_name in the fly.toml. :laughing:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.