I was trying to upgrade my existing docusaurus project from v3.4.0 to v3.5.2 when I encountered few issues.
Module not found: Error: Can't resolve '@theme/Unlisted' in '/Users/dikshantbansal/dev/developerdocs/src/theme/BlogPostPage'
import ContentVisibility from '@theme/ContentVisibility';
<ContentVisibility metadata={metadata} />
But still getting error as
ERROR
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Can someone guide here. Thanks.
Tried docusauras version upgrade from 3.4.0 to 3.5.2
Apparently, I found that there are number of hooks and functions that have been moved from @docusaurus/theme-common/internal
to @docusaurus/plugin-content-docs/client
and @docusaurus/plugin-content-blog/client
.
Had to go in almost every swizzled component and update the imports. This worked for me!