Npm update made strutctured text throw an error during render

I did npm update command on my Next.js project and after it I started receiving

TypeError: datocms_structured_text_generic_html_renderer_1.renderRule is not a function

It obviously only occurs on pages that have StructuredText in them. Other pages are fine

Please let me know what can be done here to mitigate the error. Thank you in advance.

1 Like

Hello @yuri.vaskovski

I’ve tried reproducing the error by installing a DatoCMS NextJS demo we provide here:Next.js Template blog - Start a Next.js blog in minutes
And after running npm update i wasn’t able to reproduce the issue, as it worked normally.

Perhaps there are some project specific problems that could be causing a conflict. Could you send us your project at so we can take a closer look?

Thank you!

You upgraded version of the package, so you should import renderNodeRule instead of renderRule.

1 Like