CSS asset not loading any more

Hello !

I am currently developing a custom theme, one day my css assets completely stopped working and couldn’t be loaded at all in my theme. I didn’t change anything, it used to work just fine.

My css files are loaded like this:

{{ content_for_header }}
    {{ 'custom-fonts.css' | asset_url | stylesheet_tag }}
    {{ 'base.css' | asset_url | stylesheet_tag }}
    {{ 'customer.css' | asset_url | stylesheet_tag }}

in my header.liquid section.

I also get these errors in the console:

Do you think this behavior could be CORS related ? Am I supposed to ensure CORS response header values are valid, in the theme ?

Thanks in advance for your response

Hi Racoon1,

Are you running this theme locally on your machine (via the Shopify CLI) or in a live Shopify store? If you’re using the Shopify CLI - which version are you running? You may need to update to the most recent version.

Can you also check if JS files are also not working with a console.log message?

Hope this helps!

Liam,

I am running my theme locally, I was using version:

/cli/3.46.1 darwin-x64 node-v20.2.0

and upgraded to:

/cli/3.47.5 darwin-x64 node-v20.4.0

and it solved my issue !

Thanks for your help and your answer,

Best regards

Great to hear - I believe this was a bug that was previously reported and then fixed in newer versions.