Issue with using a specific template in Sanity CLI for Shopify integration.
18 replies
Last updated: Jan 19, 2022
G
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
A
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
G
It's the one for Sanity connect https://github.com/sanity-io/sanity/tree/feat/shopify-template/packages/%40sanity/cli/templates/shopify
Jan 19, 2022, 10:54 AM
G
https://www.sanity.io/docs/sanity-connect-for-shopify stated in this guide and taken directly from Shopify
Jan 19, 2022, 10:55 AM
G
Used here too https://www.youtube.com/watch?v=TUY84_V5f9Q
Jan 19, 2022, 10:56 AM
A
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
G
It's the one for Sanity connect https://github.com/sanity-io/sanity/tree/feat/shopify-template/packages/%40sanity/cli/templates/shopify
Jan 19, 2022, 10:54 AM
G
Getting the same template not found error.
Jan 19, 2022, 11:00 AM
G
https://www.sanity.io/docs/sanity-connect-for-shopify stated in this guide and taken directly from Shopify
Jan 19, 2022, 10:55 AM
G
Used here too https://www.youtube.com/watch?v=TUY84_V5f9Q
Jan 19, 2022, 10:56 AM
A
Hmm, interesting! That only happens for me if I exclude the
@shopifytag. Please can you let me know which version of npm you are using?
Jan 19, 2022, 11:06 AM
G
7.20.0
Jan 19, 2022, 11:09 AM
A
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
A
Please can you let me know the output when you run this command?
npx @sanity/cli@shopify --version
Jan 19, 2022, 11:23 AM
G
@sanity/cli version 2.24.1
Jan 19, 2022, 11:23 AM
A
Very peculiar. The issue here is that for some reason the command
For example, here is the output I see when I run
npx @sanity/cli@shopifyis not using the
@shopifytag 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
G
I've installed npm i @sanity/cli@2.21.12-shopify.7 and it's working now
Jan 19, 2022, 11:27 AM
G
Jan 19, 2022, 11:28 AM
A
I'm glad you got it working!
npxshould 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.