Mustache: Serializer for class 'MustacheContent' is not found

I’m trying to do a project using Ktor and Mustache (amongst other things). However, when I tried templating with Mustache, following this tutorial, I get the following error:

500: kotlinx.serialization.SerializationException: Serializer for class 'MustacheContent' is not found.
Mark the class as @Serializable or provide the serializer explicitly.

Of course, I can’t change the MustacheContent class for it to be Serializable, since it’s part of the Mustache package. Any idea as to what might fix this ?

>Solution :

This is a known bug. The fix will be delivered in the Ktor 2.3.0 release. As a workaround, you can place an installation of the ContentNegotiation plugin after an installation of the Mustache plugin.

Leave a Reply