Repository navigation
|
Module not found: Error: Can't resolve '@docusaurus/plugin-content-blog/client' in '...' import React from 'react';
import BlogPostItem from '@theme-original/BlogPostItem';
import { useBlogPost } from '@docusaurus/plugin-content-blog/client';
const {assets, metadata} = useBlogPost();
const { title, description, date, tags, authors, frontMatter } = metadata;
export default function BlogPostItemWrapper(props) {
return (
<>
<BlogPostItem {...props} />
<h1>{title}</h1>
</>
);
} |
Answered by
slorber
Nov 28, 2025
Replies: 1 comment 5 replies
No need to be condescending 🤷♂️ Keep in mind that you deliberately choose to opt-in for implementation detail breaking changes when swizzling a theme compnent flagged as "unsafe", using an api that is not publicly documented: https://docusaurus.io/community/release-process#theming-public-api That being said, we haven't moved it recently, and the import above should still work. If that's not the case, provide a repro. |
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
afaik pnpm is quite strict in terms of module resolution. You may need to add
@docusaurus/plugin-content-blogas a direct dependency of your siteIf you use the preset like most sites do, the blog plugin is likely a transitive dependency, and pnpm resolution doesn't see it for your site