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

Open
anthonybench opened this issue Nov 9, 2024 · 2 comments
Open

Next-15 installation error #269

anthonybench opened this issue Nov 9, 2024 · 2 comments

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.

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

3 participants