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?
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!
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
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.
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
Thank you, this worked for me as well. First time this has happened to me, I guess it occurs when the store changes its name or something like that. Anyway, it’s all sorted now. Thanks again!