Shopify CLI Error: "Operation Not Permitted" when running 'Shopify theme serve'

I’m having issues trying to use the Shopify CLI to create a development theme. Once I get to running ‘Shopify theme serve’ I get the following error:

internal:dir:134:in `glob’: Operation not permitted - ./Library/Accounts (Errno::EPERM)”

Steps to reproduce

  1. ‘Shopify Login’ to log into my development store
  2. ‘Shopify theme init’ to create a new theme
  3. ‘Shopify theme serve’ to serve the theme
  4. ERROR

This appears to be a separate issue to this one:https://community.shopify.com/c/Technical-Q-A/shopify-theme-serve-not-working-in-Shopify-CLI/m-p/1231086#M59841 as I get the same error message when using my collaborator account (as apposed to a store owner account or staff account as I’m using now).

Please help.

Chris

Hello! I was running into this issue too. I finally realized, at least for me:

  • My theme was connected to github (as described in the docs here: https://shopify.dev/themes/tools/github)

  • But I was on a different branch than the one that was connected to the theme

  • Once I switched back to the branch that was connected to the theme, the error went away!

If you’re not using GitHub this might be because you’re calling shopify theme serve in the wrong folder. It must be your projects folder. The same is true for shopify theme pull and other commands.

2 Likes