dagger: [docs][Getting Started] failed to load plan: client.env.APP_NAME

What is the issue?

I tried dagger locally. I was following the CI/CD in your local dev and got the following error

failed to load plan: "client.env.APP_NAME" is not set


Usage:
  dagger do [flags]


Flags:
      --cache-from stringArray   External cache sources (eg. user/app:cache, type=local,src=path/to/dir)
      --cache-to stringArray     Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir)
  -h, --help                     help for do
      --no-cache                 Disable caching
  -p, --plan string              Path to plan (defaults to current directory) (default ".")
      --platform string          Set target build platform (requires experimental)
  -w, --with stringArray
Global Flags:
      --experimental        Enable experimental features
      --log-format string   Log format (auto, plain, tty, json) (default "auto")
  -l, --log-level string    Log level (default "info")

question

Do I need to prepare my .env file? if so, I need to know how to do that.

reproduce

  • $ brew install dagger/tap/dagger
  • $ type dagger
    • dagger is /opt/homebrew/bin/dagger
  • $ docker --version
    • Docker version 20.10.13, build a224086
  • $ cd Desktop
  • $ git clone https://github.com/dagger/dagger
  • $ cd dagger
  • $ git checkout v0.2.7
Note: switching to 'v0.2.7'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 18c19174 Merge pull request #2198 from dagger/dependabot/npm_and_yarn/website/async-2.6.4
  • $ cd pkg/universe.dagger.io/examples/todoapp
  • $ dagger do build
failed to load plan: "client.env.APP_NAME" is not set


Usage:
  dagger do [flags]


Flags:
      --cache-from stringArray   External cache sources (eg. user/app:cache, type=local,src=path/to/dir)
      --cache-to stringArray     Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir)
  -h, --help                     help for do
      --no-cache                 Disable caching
  -p, --plan string              Path to plan (defaults to current directory) (default ".")
      --platform string          Set target build platform (requires experimental)
  -w, --with stringArray
Global Flags:
      --experimental        Enable experimental features
      --log-format string   Log format (auto, plain, tty, json) (default "auto")
  -l, --log-level string    Log level (default "info")

Ideally, I expected the following outputs

[✔] client.filesystem."./".read                                   0.1s
[✔] actions.deps                                                118.8s
[✔] actions.test.script                                           0.1s
[✔] actions.test                                                  6.3s
[✔] actions.build.run.script                                      0.0s
[✔] actions.build.run                                            43.7s
[✔] actions.build.contents                                        0.4s
[✔] client.filesystem."./_build".write                            0.1s

Dagger version

dagger 0.2.8 (92c8c7a2) darwin/arm64

Homebrew version

Homebrew 3.4.9

Os version

  • mac
  • tips: apple m1

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (10 by maintainers)

Most upvoted comments

🙌 happy to have you onboard and I’m sorry that you had a bumpy start. We’re constantly improving Dagger, so any other feedback or contributions are welcome!

wave there! apologies for the noise. Please do a dagger project update using v0.2.8 and that should fix it. We did some stdlib changes that require an update to work. We’ve already added a PR to improve this UX for the next time we make such changes

👋 again. I gave an incorrect fix prematurely. The correct way to proceed here is to checkout v0.2.8 since it’s the same dagger CLI version you’re using. We’ve already updated our docs and we’ll be fixing this so it doesn’t happen again. 🙏

I’ll leave this open until we implement the permanent fix.

I succeeded to make it working by skipping git checkout v0.2.7