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

init command doesn't work with npx #1861

Open
gfscott opened this issue Mar 15, 2024 · 2 comments
Open

init command doesn't work with npx #1861

gfscott opened this issue Mar 15, 2024 · 2 comments

Comments

@gfscott
Copy link
Contributor

gfscott commented Mar 15, 2024

We document the init command but npx shopify hydrogen init doesn't work outside of an existing Hydrogen project:

image

It would be helpful to be able to use npx directly in the project create flow, because then you could pass flags to init directly, without having to do the double-dash trick:

create npx
npm create @shopify/hydrogen@latest -- --quickstart npx shopify hydrogen init --quickstart
@frandiox
Copy link
Contributor

Not sure if this has worked before. What was working was npx @shopify/cli-hydrogen init, which uses our cli plugin directly as an executable but we shouldn't probably use this directly.

@isaacroldan Do you think we can make npx shopify hydrogen init work and forward flags to npm create?

@isaacroldan
Copy link
Contributor

That would work with the global CLI project like: shopify hydrogen init which internally calls @shopify/cli-hydrogen init

npx shopify hydrogen init will also work if you have the global CLI installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants