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

Next-15 installation error #269

Closed
anthonybench opened this issue Nov 9, 2024 · 5 comments
Closed

Next-15 installation error #269

anthonybench opened this issue Nov 9, 2024 · 5 comments
Labels

Comments

@anthonybench
Copy link

Installing fails on next-15, and suggests either --force or --legacy-peer-deps flags to install.

Specifically, my versions are:

    "next": "15.0.3",
    "react": "19.0.0-rc-66855b96-20241106",
    "react-countdown": "^2.3.6",
    "react-dom": "19.0.0-rc-66855b96-20241106"

I tried --legacy-peer-deps, perhaps that's my mistake, but I see the following error:

Server Error

TypeError: Super expression must either be null or a function

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
_inherits
node_modules/react-countdown/dist/index.es.js (28:1)
eval
node_modules/react-countdown/dist/index.es.js (216:1)
eval
node_modules/react-countdown/dist/index.es.js (285:3)
@MRingive
Copy link

Adding 'use client' to the component fixed this for me - see https://nextjs.org/docs/app/api-reference/directives/use-client

@jecsham
Copy link

jecsham commented Dec 4, 2024

Since Nextjs 15 is using react "19.0.0-rc-66855b96-20241106" which is not a production version yet, you may need to run npm install with --force flag and it should work with no issues.

If you deploy in Vercel, make sure to modify the install command to npm install --force as well.

@ndresx
Copy link
Owner

ndresx commented Feb 3, 2025

@ndresx ndresx added the question label Feb 3, 2025
@anthonybench
Copy link
Author

Hi, maybe it's too late for this already, but would this help? https://github.com/ndresx/react-countdown?tab=readme-ov-file#why-do-i-get-this-error-warning-text-content-did-not-match

That wasn't my issue, I see that commonly but assume it's just because it's a server-side timer that that's sending the render to the client, and there's some expected latency, thus they'll never perfectly match.

@anthonybench
Copy link
Author

@MRingive and @jecsham both gave working solutions to this issue, thanks! closing.

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

No branches or pull requests

4 participants