[PUT] Asset returns "Cannot overwrite generated asset"

New Member
4 0 0

Hi, I am getting this error "Cannot overwrite generated asset <asset_key>" when trying to update a JS file in a theme through the API. Do you have any idea why that may be happening and how to fix it? I couldn't find any documentation about this error and even a Google search returns less than 1 full page of results :(


Replies 3 (3)
Shopify Staff
619 49 101

Hi there,

Some theme assets are automatically generated by Shopify and cannot be updated through the API like other assets. When you attempt to do so, you are given the error that you are seeing.


Andrew | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

New Member
4 0 0
13 0 0

But if the said file (in my case theme.scss) is generated by Shopify and cannot be updated manually, then why do we have access to it?  And how can it be deleted if it's generated from within Shopify only?

I was trying to set up a local dev environment and mistakenly deleted this theme.scss file in my local directory which automatically removed it from my Assets folder in Shopify. I'm trying to get it back into my Assets folder because it contains all my styling variables, but this error is keeping me from doing so. 

Any insight into this?