Cannot `dev` theme

I have reproduced the issue on the latest CLI version.

Yes, I am on the latest version

I have searched existing posts and this report is not a duplicate.

Yes, this isn’t a duplicate

In which of these areas are you experiencing a problem?

Theme

Expected behavior

shopify theme dev works!

Actual behavior

Fails with the following message:

╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Failed to perform the initial theme synchronization.                        │
│                                                                              │
│  number of 'filenames' must be less than or equal to 50:                     │
│  {"response":{"errors":[{"message":"number of 'filenames' must be less than  │
│   or equal to 50","locations":[{"line":3,"column":5}],"path":["theme","file  │
│  s"],"extensions":{"code":"BAD_REQUEST"}}],"data":{"theme":{"files":null,"_  │
│  _typename":"OnlineStoreTheme"}},"extensions":{"cost":{"requestedQueryCost"  │
│  :25,"actualQueryCost":4,"throttleStatus":{"maximumAvailable":2000,"current  │
│  lyAvailable":1996,"restoreRate":100}}},"status":200,"headers":{}},"request  │
...

Reproduction steps

Run shopify theme dev

Verbose output

The output length exceeds the allowed size, adding only the last part:

2025-11-07T22:39:53.868Z: Failed to perform the initial theme synchronization.
Error: number of 'filenames' must be less than or equal to 50: {"response":{"errors":[{"message":"number of 'filenames' must be less than or equal to 50","locations":[{"line":3,"column":5}],"path":["theme","files"],"extensions":{"code":"BAD_REQUEST"}}],"data":{"theme":{"files":null,"__typename":"OnlineStoreTheme"}},"extensions":{"cost":{"requestedQueryCost":25,"actualQueryCost":4,"throttleStatus":{"maximumAvailable":2000,"currentlyAvailable":1996,"restoreRate":100}}},"status":200,"headers":{}},"request":{"query":"query getThemeFileBodies($id: ID!, $after: String, $filenames: [String!]) {\n  theme(id: $id) {\n    files(first: 250, after: $after, filenames: $filenames) {\n      nodes {\n        filename\n        size\n        checksumMd5\n        body {\n          __typename\n          ... on OnlineStoreThemeFileBodyText {\n            content\n            __typename\n          }\n          ... on OnlineStoreThemeFileBodyBase64 {\n            contentBase64\n            __typename\n          }\n          ... on OnlineStoreThemeFileBodyUrl {\n            url\n            __typename\n          }\n        }\n        __typename\n      }\n      userErrors {\n        filename\n        code\n        __typename\n      }\n      pageInfo {\n        hasNextPage\n        endCursor\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n}","variables":{"id":"gid://shopify/OnlineStoreTheme/156338979066","filenames":["snippets/account-modal.liquid","snippets/back-to-top.liquid","snippets/cart-button.liquid","snippets/color-swatch-style.liquid","snippets/company-info.liquid","snippets/country-localization.liquid","snippets/company-logo-footer.liquid","snippets/fullscreen-bg.liquid","snippets/css-variables.liquid","snippets/icon-facebook.liquid","snippets/icon-instagram.liquid","snippets/icon-linkedin.liquid","snippets/icon-pinterest.liquid","snippets/icon-snapchat.liquid","snippets/icon-vimeo.liquid","snippets/icon-twitch.liquid","snippets/icon-telegram.liquid","snippets/icon-whatsapp.liquid","snippets/icon-youtube.liquid","snippets/icon-tumblr.liquid","snippets/language-localization.liquid","snippets/menu-link.liquid","snippets/menu-category.liquid","snippets/menu-shop-banner.liquid","snippets/menu-product.liquid","snippets/menu-shop.liquid","snippets/menu-single.liquid","snippets/menu-sub.liquid","snippets/product-grid-variant.liquid","snippets/product-menu-grid.liquid","snippets/product-news-list.liquid","snippets/product-menu-list.liquid","snippets/product-template-delivery-date.liquid","snippets/product-template-review.liquid","snippets/product-template-quantity.liquid","snippets/product-variant-options.liquid","snippets/product-variant-picker.liquid","snippets/search-bar.liquid","snippets/search-filter.liquid","snippets/social-media.liquid","snippets/swatch-input.liquid","snippets/swatch.liquid","snippets/vega-menu-collection.liquid","snippets/vega-menu-link.liquid","snippets/vega-menu-product.liquid","snippets/vega-menu-product2.liquid","snippets/vega-menu-shop-banner.liquid","snippets/vega-menu-shop.liquid","snippets/vega-menu-single.liquid","snippets/vega-menu-sub.liquid","templates/product.wishlist.liquid","sections/about-section2.liquid","sections/404-template.liquid","sections/about-section3.liquid","sections/about-section4.liquid","sections/about-section5.liquid","sections/about-section7.liquid","sections/blog-home.liquid","sections/collection-category.liquid","sections/collection-template-list.liquid","sections/collection-template-list-right.liquid","sections/collection-template-list-without.liquid","sections/collection-template-without.liquid","sections/collection-template-right.liquid","sections/contact-section2.liquid","sections/contact-section1.liquid","sections/copy-right.liquid","sections/contact-section4.liquid","sections/custom-banner.liquid","sections/custom-image-text.liquid","sections/custom-video.liquid","sections/deals-banner.liquid","sections/help-desk.liquid","sections/news-popup3.liquid","sections/news-popup2.liquid","sections/news-popup5.liquid","sections/offer-grid.liquid","sections/news-popup6.liquid","sections/news-popup4.liquid","sections/newsletter.liquid","sections/privacy-policy.liquid","sections/product-grid-verticle.liquid","sections/refund-policy.liquid","sections/section-border.liquid","sections/slider-category.liquid","sections/store-location.liquid","sections/special-category.liquid","sections/top-bar2.liquid","sections/top-bar3.liquid","sections/video-banner.liquid"],"after":null}}}
    at makeRequest (file:///opt/homebrew/lib/node_modules/@shopify/cli/dist/chunk-LMVYXPIS.js:28042:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Object.rawGraphQLRequest [as request] (file:///opt/homebrew/lib/node_modules/@shopify/cli/dist/chunk-43MAAODZ.js:3909:103)
    at async runRequestWithNetworkLevelRetry (file:///opt/homebrew/lib/node_modules/@shopify/cli/dist/chunk-LMVYXPIS.js:28114:14)
    at async makeVerboseRequest (file:///opt/homebrew/lib/node_modules/@shopify/cli/dist/chunk-LMVYXPIS.js:28125:16)
    at async retryAwareRequest (file:///opt/homebrew/lib/node_modules/@shopify/cli/dist/chunk-LMVYXPIS.js:28212:102)
    at async file:///opt/homebrew/lib/node_modules/@shopify/cli/dist/chunk-43MAAODZ.js:3927:18
    at async file:///opt/homebrew/lib/node_modules/@shopify/cli/dist/chunk-QIIIG73M.js:30254:16
    at async fetchThemeAssets (file:///opt/homebrew/lib/node_modules/@shopify/cli/dist/index.js:194972:20)
    at async downloadFiles (file:///opt/homebrew/lib/node_modules/@shopify/cli/dist/index.js:199069:16)

Operating system

Mac OS 14.6.1 (23G93)

CLI version

3.87.0

Shell

zsh

Nodejs version

v24.2.0

Same here, with 3.87.0… Need to downgrade to fix
npm uninstall -g @shopify/cli
npm install -g @shopify/cli@3.86.0

Although for me as soon as i encountered this issue and downgraded first time, it still persisted this error. Until i downgraded to 3.69.0 it kept happening for the whole day even with older cli versions and on top of that for all repositories (even fresh ones with Dawn), which was very weird. That’s why i didn’t know what to do. Was this cache or?

Yeahh same problem for 2 days I can’t use shopify CLI

Same here. Not sure if this is a new feature or a bug?

Same here. Anyone from Shopify team please reply or/and suggest what are the best option for further usage of CLI.

I’m experiencing the same issue with Shopify CLI version 3.87.0: “Failed to perform the initial theme synchronization”. Error: “number of ‘filenames’ must be less than or equal to 50”
For now, my workaround was to uninstall the current version and install an earlier one:

npm uninstall -g @shopify/cli
npm install -g @shopify/cli@3.86.1

Has anyone found a better or official fix? Thanks!

I’m experiencing same issue. I updated to v3.87.0 today and “shopify theme dev” doesn´t work. First error was “The input array size of 288 is greater than the maximum allowed of 250”, after deleting some obsolete files and reaching less than 250, the error changed to “number of filenames must be less than or equal to 50“.

In case it helps, to resolve this temporarily, I use this command, which allows me to develop locally without any problems: “npx @shopify/cli@3.85.5 shopify theme dev“

Please let me know if this fixed it: Shopify Theme Dev syncs endlessly - #17 by AlokSwamy

1 Like

:police_car_light: There has been a patch release fixing the issue for theme dev:
Version 3.87.1 solve this issue.

3 Likes