Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't h2 link to storefront #1463

Open
2 tasks done
theocerutti opened this issue Oct 27, 2023 · 1 comment
Open
2 tasks done

Can't h2 link to storefront #1463

theocerutti opened this issue Oct 27, 2023 · 1 comment

Comments

@theocerutti
Copy link

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Other

Expected behavior

I can run h2 login or h2 link to link my storefront.

Actual behavior

When I run h2 link command there is an error: "ERROR SelectPrompt requires at least one choice"

SOLUTION: Actually I had to do h2 logout (however it was a repository that I just pulled, so it's weird)

Verbose output

ERROR  SelectPrompt requires at least one choice

 node_modules/@shopify/cli-hydrogen/node_modules/@shopify/cli-kit/dist/private/node/ui/components/SelectPrompt.js:9:15

  6: // eslint-disable-next-line react/function-component-definition
  7: function SelectPrompt({ message, choices, infoTable, infoMessage, gitDiff, onSubmit, defaultValue, abortSignal, }) {
  8:     if (choices.length === 0) {
  9:         throw new Error('SelectPrompt requires at least one choice');
 10:     }
 11:     const { exit: unmountInk } = useApp();
 12:     const { promptState, setPromptState, answer, setAnswer } = usePrompt({

 - SelectPrompt (node_modules/@shopify/cli-hydrogen/node_modules/@shopify/cli-kit/dist/private/node/ui/components/SelectPrompt.js:9:15)
 - renderWithHooks (node_modules/react-reconciler/cjs/react-reconciler.development.js:7478:18)
 - mountIndeterminateComponent (node_modules/react-reconciler/cjs/react-reconciler.development.js:11247:13)
 - beginWork (node_modules/react-reconciler/cjs/react-reconciler.development.js:12760:16)
 - beginWork$1 (node_modules/react-reconciler/cjs/react-reconciler.development.js:19569:14)
 - performUnitOfWork (node_modules/react-reconciler/cjs/react-reconciler.development.js:18703:12)
 - workLoopSync (node_modules/react-reconciler/cjs/react-reconciler.development.js:18609:5)
 - renderRootSync (node_modules/react-reconciler/cjs/react-reconciler.development.js:18577:7)
 - performSyncWorkOnRoot (node_modules/react-reconciler/cjs/react-reconciler.development.js:18193:20)
 - flushSyncCallbacks (node_modules/react-reconciler/cjs/react-reconciler.development.js:2936:22)

Reproduction steps

  1. Pull a hydrogen repository that has already been setup (but you didn't link it)
  2. Run h2 link
  3. Error

Operating System

linux

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

^5.5.1

Shell

No response

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

lts/iron

What language and version are you using in your application?

No response

@Arkham Arkham transferred this issue from Shopify/cli Oct 30, 2023
@frandiox
Copy link
Contributor

frandiox commented Jun 6, 2024

@aswamy Is this something you fixed recently?

@theocerutti theocerutti changed the title Can't link storefront Can't h2 link to storefront Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants