Issue with using a specific template in Sanity CLI for Shopify integration.

18 replies
Last updated: Jan 19, 2022
Any help on this would be appreciated. Far as I can tell this template is not on the main branch?
Jan 19, 2022, 10:43 AM
Hi User. Please can you share a link to the template you want to use? I couldn't find anything matching
sanity-template-shopify
.
Jan 19, 2022, 10:52 AM
https://www.sanity.io/docs/sanity-connect-for-shopify stated in this guide and taken directly from Shopify
Jan 19, 2022, 10:55 AM
Jan 19, 2022, 10:56 AM
Aha! I think I see the problem. These changes only seem to be published on a specific tag of the CLI at the moment. Please can you try this command?

npx @sanity/cli@shopify init --template shopify

Jan 19, 2022, 10:58 AM
Getting the same template not found error.
Jan 19, 2022, 11:00 AM
https://www.sanity.io/docs/sanity-connect-for-shopify stated in this guide and taken directly from Shopify
Jan 19, 2022, 10:55 AM
Jan 19, 2022, 10:56 AM
Hmm, interesting! That only happens for me if I exclude the
@shopify
tag. Please can you let me know which version of npm you are using?
Jan 19, 2022, 11:06 AM
7.20.0
Jan 19, 2022, 11:09 AM
Okay, thanks. That doesn't seem to be the issue, I just successfully tested using
npm@7.20.0
.
Jan 19, 2022, 11:17 AM
Please can you let me know the output when you run this command?

npx @sanity/cli@shopify --version 
Jan 19, 2022, 11:23 AM
@sanity/cli version 2.24.1
Jan 19, 2022, 11:23 AM
Very peculiar. The issue here is that for some reason the command
npx @sanity/cli@shopify
is not using the
@shopify
tag for you.
For example, here is the output I see when I run
npx @sanity/cli@shopify --version
.

@sanity/cli version 2.21.12-shopify.7+43c0621a9
Jan 19, 2022, 11:25 AM
I've installed npm i @sanity/cli@2.21.12-shopify.7 and it's working now
Jan 19, 2022, 11:27 AM
I'm glad you got it working!
npx
should use that version when you run commands such as
npx @sanity/cli@shopify init
. I'm not sure why that's not happening in this case.
Jan 19, 2022, 11:29 AM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?