CSS and js for cards are not being loaded in local development mode

Ghost version: 4.32.0
Environment: development
OS: Windows 10

As per the documentation (Ghost Theme Features: The Editor - Documentation), default CSS and javascript for cards, ie. cards.min.css and cards.min.js should be output by {{ghost_head}} helper.

I have tested with multiple themes. Even Casper is not showing any card properly in the local development environment.

How can I solve this?

It works fine for me, and I don’t think it’s a theme-related issue. Probably you need to restart Ghost?

I have tested in localhost and it still does not work for me. Maybe this issue is occurring in Windows OS only.
I have tested it on a server in production and it works. But not in localhost on Windows PC.

Running into this same issue. Did you ever figure out what the problem was? Restarting Ghost doesn’t fix it, and I’ve also installed Ghost in a new directory.

I’m also running in development mode on Windows.

Are running in WSL? I’ve been running Ghost in dev mode and everything works as expected

Nah, purely Windows 10. I’ll give WSL another go but last time I tried there was an issue with port forwarding so I couldn’t use a browser within Win10 to connect to Ghost running in WSL2. I decided to just do development in Win10 as well instead of trying to figure it out, I think it was a known and ongoing issue at the time.

Got Ghost set up in WSL, running in dev mode. Got the port forwarding issue figured out too.

Card assets are loading as expected, with absolutely zero changes to the theme and using the same version of ghost-cli and Ghost. Must be something about Ghost running on Windows 10.

I think there’s an issue filed for this - Cannot generate assets (cards, admin-auth, etc) on local windows install · Issue #14278 · TryGhost/Ghost · GitHub

1 Like

Yeah that definitely sounds like what is going on. Should’ve searched better before posting here :sweat_smile: