I just got this new weird error after last update to v12.8, theme generation error

You can try a

bench update --reset

and also check this post