Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jasondev01 opened this issue Dec 7, 2024 · 0 comments
Open

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

jasondev01 opened this issue Dec 7, 2024 · 0 comments

Comments

@jasondev01
Copy link

jasondev01 commented Dec 7, 2024

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",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant