For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
When I do yarn ``` shopify app generate extension --name my-extension ```
I receive a prompt to choose language and when I select either JS or TS, this error below appears.
yarn add @Shopify/shopify_function@0.1.0 javy@0.1.1 --prod
Unknown Syntax Error: Command not found; did you mean one of:
0. yarn add [--json] [-F,--fixed] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev]
[-i,--interactive] [--cached] [--mode #0] ...
1. yarn add [--json] [-F,--fixed] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev]
[-i,--interactive] [--cached] [--mode #0] ...
2. yarn add [--json] [-F,--fixed] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev]
[-i,--interactive] [--cached] [--mode #0] ...
While running add @Shopify/shopify_function@0.1.0 javy@0.1.1 --prod
How can I fix this?
Hey @vincedenis
Try:
```
npm run shopify app generate extension -- --name my-extension
```
Scott | Developer Advocate @ Shopify
This error is happening for us as well, even with only specifying the extension name.
We're using:
```
npx shopify app generate extension --name my-validation-extension
```
Want to see it in action? Check out our demo store.
Hey @dylanpierce
Can you try updating `@shopify/cli` / which version is specified in your package.json?
Scott | Developer Advocate @ Shopify