We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Problem with CLI 3 - Serving code locally

Problem with CLI 3 - Serving code locally

Grant_Feast
Shopify Partner
11 0 1

Hi All,

 

Just wondering if someone could point me in the right direction? 

 

I've updated the Shopify CLI version to 3.36 on my mac and I was trying to get my Shopify theme code served locally through the terminal but I'm having a few problems.

 

I typed in to the terminal: shopify theme dev --store=(my store link) and then it oped a tab so that I could sign in to the store which was fine but then instead of the CLI serving the theme code I get a message saying "It doesn’t seem like you’re running this command in a theme directory. Are you sure you want to proceed?"

 

I'm probably missing something really obvious here, but I haven't had that come up in the past with CLI 2. If someone could point me in the right direction that would be great!

Replies 4 (4)

PaulNewton
Shopify Partner
8031 687 1646

 "It doesn’t seem like you’re running this command in a theme directory. Are you sure you want to proceed?"

Ensure you are in the root directory where a themes folders are.

You cannot run the theme serve command from a remote directory location unless there is a specific flag to pass it the target directory path.

The directory command flag is --path See https://shopify.dev/themes/tools/cli/commands#init-flags 

 

Beyond that search issues or if you can reliably reproduce the issue file a bug report

https://github.com/Shopify/cli 

 

  

 

  

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


mavsalqueza
Shopify Partner
16 0 6

append 

 

--path (your_shopify_folder_name)

 

Driver3
Shopify Partner
30 1 1

I was asking about the file path, but I found it. Thanks

Web-Wizard
Shopify Partner
17 4 13

You need to be in a folder on your terminal where you want to download the theme file. cd into the folder: In my case, it was cd Desktop/app/juni-buni => hit Enter, and then use the code shopify theme pull --store storename.myshopify.com. Hopefully, it will solve the issue.

Screenshot 2023-05-24 at 22.07.24.png

Kind regards,
Shahidul
Web Wizard
email: contact@webwizard.ie