disqus / disqus-react

A React component for Disqus
MIT License
365 stars 46 forks source link

Error: Super expression must either be null or a function #154

Open olegdater opened 7 months ago

olegdater commented 7 months ago

Describe the bug

When using DiscussionEmbed in NextJS project i get error: Error: Super expression must either be null or a function

To Reproduce

Insert code:


          <DiscussionEmbed
            shortname="MY_SHORT_NAME"
            config={{
              url: `MY_URL`,
              identifier: path,
              title,
              language: 'en_EN',
            }}
          />

Expected behavior

should render discussion

Screenshots

Screenshot 2024-02-17 at 17 50 16 n.

Specifications:

Additional context

"next": "^13.5.6",
moonstar-x commented 6 months ago

Have you tried adding 'use client' at the top of the file that imports DiscussionEmbed?