How to render entry links in RTF content with renderRichText() (Gatsby)

I used the Contentful/Gatsby “blog” starter, but it doesn’t account for links in content. If I add a link to an entry in my content at Contentful, the page breaks in Gatsby (“Cannot read properties of undefined (reading ‘sys’)”).

I’m using renderRichText(), but cannot figure out what needs to happen for links to work. I managed to get images working using the options parameter of renderNode(), but links just kill the page.