disqus-react
disqus-react copied to clipboard
⨯ ./node_modules/disqus-react/lib/CommentCount.js:10:1
Describe the bug
I am trying to install/integrate Disqus on my Nextjs 14.2.12 web app. But I am getting this error:
⨯ ./node_modules/disqus-react/lib/CommentCount.js:10:1
Module not found: Can't resolve 'prop-types'
To Reproduce
Embed this code: ` "use client"
import { ReviewInterface } from "@/types/content" import { DiscussionEmbed } from "disqus-react" import { usePathname } from "next/navigation"
type Props = { data?: ReviewInterface }
export default function DisqusElement({ data }: Props) { const pathname = usePathname()
const disqusConfig = {
url: `http://localhost:3000${pathname}`,
identifier: pathname.replace('/', ''),
title: `sample`
}
const shortname = "your-shortname"
return (
<div>
<DiscussionEmbed
shortname={shortname as string}
config={disqusConfig}
/>
</div>
)
} `
Expected behavior
It should render or display the disqus comment plugin.
Screenshots
Specifications:
- OS: Windows 11
- Package version: 1.1.5
- Node version: 20.17.0
Additional context
"next": "14.2.12",