Shopify CLI Error - invalid_target

bcrave
Shopify Partner
4 0 7

I am just learning how the Shopify CLI works and am just following the docs right now.  Whenever I run `shopify theme dev --store {my-store}`, I am able to log in successfully but then get an error saying `invalid_target`.

 

I can't find any info on this error in the documentation, and have tried the login process on both Firefox and Chrome browsers.  Has anyone been able to resolve this issue successfully?

Replies 16 (16)

kaalTechGeeks
Shopify Partner
299 56 76

HI @bcrave, Can you please share a screenshot or something so that I can take a better look at the issue. 

- If my answers saved you time and headaches, consider buying me a coffee!
- Check my profile: KaalTechGeeks | Reach out to me on my socials - Instagram | Skype | Mail
- Was my reply helpful? Click Like to let me know! & if your question was answered, Mark it as an Accepted Solution!

the_rbt
Shopify Partner
4 0 2

I've had the same problem since yesterday.

I upgraded the Shopify CLI version from 3.22.1 to 3.23.0 and downgraded to the stable Node version, but it still did not work.

 

Screenshot 2022-11-18 at 14.49.27.png

 

 

 

kaalTechGeeks
Shopify Partner
299 56 76

https://www.youtube.com/watch?v=YM0XOa2LZSs 

Maybe this video can help you in any way 

- If my answers saved you time and headaches, consider buying me a coffee!
- Check my profile: KaalTechGeeks | Reach out to me on my socials - Instagram | Skype | Mail
- Was my reply helpful? Click Like to let me know! & if your question was answered, Mark it as an Accepted Solution!
the_rbt
Shopify Partner
4 0 2

Thanks for the video but the error is occurring after this screen:

 

Screenshot 2022-11-18 at 15.34.22.png

 

 

PixelBox
Shopify Partner
3 0 1

Yep. I'm noticing the same problem....I have particularly noticed that people who are using the 

shopify theme pull --store {your-store-name.myshopify.com}. 

 

peasquared
Shopify Partner
14 0 8

I finally got it to work. I was using the store name instead of store URL. This is what worked for me:

shopify theme dev --store=https://my_store.myshopify.com

Ben31
Trailblazer
195 8 141

The docs are confusing if you're a designer and the --store flag seems to be written different ways depending on the page with respect to the store URL. Shopify needs to do better at catering to us lowly designers!

Click to expand...
 

 

To fix, remove the {} from the command like this...

 

 

shopify theme pull --store https://yourstore.myshopify.com

 

 

NOT this (as written in some of the docs)...

 

 

shopify theme pull --store {yourstore.myshopify.com}

 

yojisekiya
Shopify Partner
5 0 3

I tried it, but it didn't work, I still get invalid_target.  I would appreciate any help!  

Screenshot 2023-03-08 at 22.27.38.png

 

edvinicombe
Shopify Partner
2 0 0

Is there any update on this thread? I've been trying to fix this all morning but not had any luck yet. Still getting an 'invalid_target' error when trying to develop my theme

karimbadruddin
Shopify Partner
1 0 0

tuanleek
Visitor
1 0 0

I think you should to create a store on your account first.

1. Go https://www.shopify.com/blog/start-online-store

2. Click to "Start free trial" button then follow the guide

3. Back to terminal and re-try the command

musaib-praella
Shopify Partner
1 0 7

After spending hours to find the solution here is what you would need to type in the terminal to login and serve the theme. You will have to login first to your theme and know the store name. In below image I have pointed to the URL for the store name. You will get this URL after logging into the store.


Markup on 2023-07-20 at 09_56_41.png




 

Then run the following in the console:

 

shopify theme dev --store b5d80a-2

 


Note: Change b5d80a-2 to your own store name

Thank you

sambuxc
Shopify Partner
2 0 2

Yep, this worked for me.

holarory
Shopify Partner
1 0 1

Thank you soooooo much!

 

This was driving me crazy, the store had been renamed so it was the original name that I needed all along to pull the theme file — before this, I was stumbling down many rabbit holes, so Kudos to you 😊

bahaaar
Shopify Partner
12 0 1

Thank you man !!

GoldDTran22
Shopify Partner
1 0 0

useful , i've solved this problem, Thankyou