@asset links not working (replaced with numbers) when Sage 10 theme is deployed

Hi guys, I have a weird problem after deploying a Sage 10 theme…

I’ve compiled assets with yarn build and pushed my theme up via wordmove, and I’ve run composer install in the theme directory as instructed, but although everything works in my valet based dev environment, on prod all of the image links that should be generated by @asset() seem to have been replaced with single digits…

For example in dev:

<img src="http://the-climate-press.test/wp-content/uploads/2022/05/logo.svg">

But the same element on prod:

<img src="6">

Any ideas what I might be missing? Maybe a PHP extension or something? This seems very strange!


Can you post your code?

Sorry for the slow response, I actually realised the problem is a lot worse than I thought… non of my CPTs seem to be working at all. I have no idea where to even start debugging as it all works fine on my local environment!