hydrogen
hydrogen copied to clipboard
`init` command doesn't work with npx
We document the init command but npx shopify hydrogen init
doesn't work outside of an existing Hydrogen project:
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 |
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
?
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