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

Cannot create property 'propTypes' on number 'Infinity' #55

Open
luigimassa opened this issue Oct 17, 2023 · 2 comments
Open

Cannot create property 'propTypes' on number 'Infinity' #55

luigimassa opened this issue Oct 17, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@luigimassa
Copy link

luigimassa commented Oct 17, 2023

Hello
I use react-bootstrap-icons with nextjs
I added a Person Icon but i displayed the error "Cannot create property 'propTypes' on number 'Infinity'"

Server Error
Error: Cannot create property 'propTypes' on number 'Infinity'

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
eval
node_modules/react-bootstrap-icons/build/index.js (35709:18)

Can anyone help me, please? thanks in advance

@derek-agent
Copy link

Our test runner was throwing this error after we upgraded several dependencies, and I traced it down to @swc/core v1.3.82. We haven't dug in further yet but reverting to v1.3.81 or earlier resolves this issue for us.

@Vacilando
Copy link

Vacilando commented Oct 22, 2023

Same problem!

There's a workaround at vercel/next.js#49169 (comment)

Basically, add this to your nextConfig object:

  experimental: {
    serverComponentsExternalPackages: ["react-bootstrap-icons"],
  },

@ismamz could you please let us know when this is fixed in react-bootstrap-icons so that people like us can remove the workaround.

@ismamz ismamz added the enhancement New feature or request label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants