Shopify / cli

Build apps, themes, and hydrogen storefronts for Shopify
https://shopify.dev
MIT License
432 stars 130 forks source link

[Bug]: Can't use multiple configurations #3399

Closed palpha closed 8 months ago

palpha commented 8 months ago

Please confirm that you have:

In which of these areas are you experiencing a problem?

App

Expected behavior

We have multiple partner apps per project, for various development purposes – ie multiple developers working independently and different staging environments. Some apps have a checked-in configuration, like production and stage. The configurations for individual development are kept untracked. A developer prepares and selects a configuration to use with shopify app config link and .. config use, then runs yarn dev to carry on with their work.

Actual behavior

These commands no longer work. The documentation is out of sync, both in https://github.com/Shopify/cli/blob/3.55.4/packages/cli/README.md and on https://shopify.dev/docs/apps/tools/cli/commands. I can't find any documentation on how to continue working with multiple apps in a single project.

Verbose output

$ yarn shopify app config use --verbose
2024-02-08T10:37:23.419Z: 'Did you mean' options: [{"score":7,"cmd":"config:autocorrect:status"},{"s
core":6,"cmd":"config:autocorrect:on"},{"score":6,"cmd":"config:autocorrect:off"},{"score":4,"cmd":"
app:info"},{"score":4,"cmd":"app:update-url"},{"score":4,"cmd":"app:function:run"},{"score":4,"cmd":
"app:function:build"},{"score":4,"cmd":"app:function:schema"},{"score":4,"cmd":"app:function:typegen
"},{"score":4,"cmd":"app:generate:extension"},{"score":3,"cmd":"app:dev"},{"score":3,"cmd":"app:buil
d"},{"score":3,"cmd":"app:deploy"},{"score":3,"cmd":"app:env:pull"},{"score":3,"cmd":"app:env:show"}
,{"score":3,"cmd":"app:generate:schema"}]
?  Command `app config use` not found. Did you mean `config autocorrect status`?


### Reproduction steps

1. Use CLI version 3.55.4.
2. Run `yarn shopify app config use` to select a configuration.
3. Watch it fail.

### Operating System

Windows 10

### Shopify CLI version (check your project's `package.json` if you're not sure)

3.55.4

### Shell

Git Bash

### Node version (run `node -v` if you're not sure)

v20.9.0

### What language and version are you using in your application?

_No response_
palpha commented 8 months ago

It seems like something broke in the upgrade from nightly 3.x to 3.55.4. After hitting the project with a hammer for a while, things worked as expected again.