
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThe warning you're seeing should not appear if your component is correctly defined. This warning indicates that @portabletext/react is encountering an internalLink mark type in your content but isn't finding the corresponding component definition—even though you think you've defined it.
Here are the most likely causes and solutions:
The most common issue is that your myPortableTextComponents object isn't actually being passed to the PortableText component properly. Double-check that:
PortableText wrapper component (not accidentally importing the original from @portabletext/react elsewhere)components prop is actually being passed through with {...props}The mark type name in your Sanity schema must exactly match the key in your components definition. According to the @portabletext/react documentation, verify in your Sanity schema that you've defined the annotation as:
{
type: 'object',
name: 'internalLink', // Must match exactly
// ... rest of schema
}Even a small typo or casing difference (InternalLink vs internalLink) will cause this warning.
Your code has a Next.js issue that could cause problems. In Next.js 13+, you should not nest an <a> tag inside <Link>. Update your component to:
const myPortableTextComponents = {
marks: {
internalLink: ({ children, value }) => {
return (
<Link href={`/${value?.slug?.current || ''}`} prefetch={false}>
{children}
</Link>
)
},
},
}Note: I also added optional chaining (value?.slug?.current) to prevent errors if the data structure isn't what you expect.
You can control how the library handles missing components using the onMissingComponent prop:
<PortableTextComponent
components={myPortableTextComponents}
onMissingComponent={(message, options) => {
console.warn(message, options)
}}
{...props}
/>However, this is just for debugging—the warning shouldn't appear in the first place if everything is configured correctly.
The key point: this warning means the library genuinely can't find your component definition. It's not "informational" or "expected"—it indicates a configuration mismatch that needs to be resolved. Make sure your schema annotation name exactly matches your component key, and verify that your custom PortableText wrapper is actually being used throughout your application.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store