CLI - Admin blocks extensions error

Im trying to test out the new Admin Blocks extension. I’m following the instructions here:

https://shopify.dev/docs/apps/admin/admin-actions-and-blocks/build-an-admin-block

When running:

npm run shopify app generate extension – --template admin_block --name issue-tracker-block --flavor react

I get an error:

Expected --template=admin_block to be one of: vanilla-js, react, typescript, typescript-react, wasm, rust

I have no issue building theme extensions. Has anyone been able to play with the Admin blocks yet?

Current Shopify CLI version: 3.48.0

Hi Josh! Hope you’re doing well :slightly_smiling_face:

I’ve connected with our dev team on this and it looks you might be trying to use an older version of the cli or app packages. Two different approaches you could try are:

  1. Run npm run shopify app generate extension and select the options interactively
  2. run npm install @Shopify_77 /cli@latest and npm install @Shopify_77 /app@latest. After that, the original command should work.

Try either of these out and see if the error is resolved - let me know if this doesn’t work.

1 Like

HI @Liam ,

Thank you for the help. npm install [@shopify](https://community.shopify.com/c/user/viewprofilepage/user-id/767810)/app@latest is exactly what was needed.

Maybe a small line the the how to docs about this will help others