disqus-react icon indicating copy to clipboard operation
disqus-react copied to clipboard

⨯ ./node_modules/disqus-react/lib/CommentCount.js:10:1

Open jasondev01 opened this issue 10 months ago • 0 comments

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

image

Specifications:

  • OS: Windows 11
  • Package version: 1.1.5
  • Node version: 20.17.0

Additional context

"next": "14.2.12",

jasondev01 avatar Dec 07 '24 18:12 jasondev01