Shopify theme serve not working in Shopify CLI

AI-generated summary

Shopify CLI “theme serve” returns: “You are not authorized to edit themes…” on newly created development stores. Shopify CLI is a developer tool; theme serve previews a local theme against a store.

Root cause and constraints:

  • On development stores, only the store owner can edit themes; staff accounts, even with theme permissions, cannot (per Shopify docs).
  • Being logged into the wrong store or a stale CLI session can trigger the error.

Fixes confirmed by multiple users:

  • Log out of Shopify CLI and log back in, explicitly targeting the correct store (e.g., shopify login --store your-store.myshopify.com); verify with shopify whoami.
  • Ensure you are the store owner when using a development store.
  • Fully initialize the store: first visit https://your-store.myshopify.com/admin in a clean browser (no cookies), complete any first-time setup prompts, then run shopify login --store and shopify theme serve.

Resources:

  • Shopify Getting Started docs (notably the “Caution” block).
  • A linked YouTube video walkthrough; several confirmations that these steps resolved the issue.

Status: Generally resolved for most after re-authentication and correct store/owner setup; one report persisted until completing admin setup in a fresh browser.

Hello,

I have an error like this in Shopify CLI

  1. I have created new store from partner account
  2. Then I login in my new store
  3. I have already installed Shopify CLI in my system
  4. Then login in and init my theme
  5. Theme is download in my system
  6. Now I have run “shopify theme serve”

I got error like this

PS D:\learn-dawn> shopify theme serve                                                                                                 
X You are not authorized to edit themes on kidszone-theme.myshopify.com.
Make sure you are a user of that store, and allowed to edit themes.

Hi Umesh,

Make sure if this is a development store, you are logged in as a store owner. Since the staff members can not edit the themes on the development stores as per Shopify’s documentation. Please try logging in using the store owner account. Please read this link for more details: https://shopify.dev/themes/tools/cli/getting-started

Best,

Shreyank

Hi @Shreyank

Thank you for replay but this error solved before your answer :slightly_smiling_face:

What did you do?

I am getting the same error and I haven’t even created other user accounts.

I am logging in as the owner.

When I enter ‘shopify whoami’ it shows:

Logged into store business******.myshopify.com in partner organization criticDev.

my mistake … but for new people who are getting this error.

Just follow the “Caution Block” in before you started section at the following link:

https://shopify.dev/themes/tools/cli/getting-started

don’t forget to logout from shopify-cli if you’re already logged in.

If you’re still facing same issue, try instructions in this video:

https://www.youtube.com/watch?v=CFSmlLfh6FE&t=240s

This fixed my issue! Thanks

Thank you! Just logging out and logging in back again via the CLI worked like a charm!

It was so helpful thanks

The steps described in this video solved my issue, thanks, i.e. log out everywhere, log back in, making sure to the correct store (as store owner in my case), and I had access to edit theme.

Hi, i logged in using store owner, but i am also getting the same error.

You are not authorized to edit themes on arpit-test-store.myshopify.com.
Make sure you are a user of that store, and allowed to edit themes.

I also tried using staff account with theme edit permission given. But same error i am receiving.

Thanks

I had the same problem; I think I found the bug:

The error was when I had created the store the first time; I was logging through the application. As this option and I didn’t access it for the first time through this link {shop}.myshopify.com/admin

Apparently, the app did not achieve to complete all the configuration, so I needed to open this link in another browser without cookies logging {shop}.myshopify.com/admin and then, logging there, this application asked me for multiple things about connecting with the new storage. and finally, I made shopify login --store {shop}.myshopify.com on the terminal, and then shopify theme serve