-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[BUG] - Property 'children' does not exist on type 'IntrinsicAttributes & SelectProps<object>'. #4542
Comments
Can you provide a sandbox? I couldn't see the error from my side. Also the error seems point to L18 (?) but the usage was commented tho.
|
Hi @wingkwong, by all means yes, here we have set up a basic webpack + react + typescript + tailwindcss project that uses NextUI: https://github.com/doshexchnage/nextui-testing Here is a permalink to the Select: We use Bun, but I can confirm that I am able to replicate this with Node+NPM (Node 18) as well. It seems to be a runtime error, so it only pops up after running Let me know if there is anything else i can provide, or of there is anything else i should try my side. Thanks! |
Just take a quick look. The given repo requires me to setup multiple things in order to get started. The current NextUI version should only support till react 19 rc since the upstream react-aria didn't support react 19 stable version yet. I bet this might be the reason. Can you try react 18 once to see if the error is gone? |
All that is required is to install the dependencies
and then to start the project
you should not have to install or setup anything else to get it running 👍🏻 I have downgraded to these versions
and i am still getting the exact same issue. however, when i also downgrade NextUI to:
then im able to render the Right now my experience is that any version of NextUI later than Note that i also had to add this Please see the new branch that i have added to the repo I don't understand why the ts-ignore would be needed to render it successfully 🤔 |
seems something wrong with the compiler side. need further investigation. |
I should be around, albeit a bit slow to respond at times - but let me know if there is anything else to try / provide, I aim to be available for trying different things to assist in getting it resolved. Thanks! 🙏🏻 |
With NextUI I always had this problem when using TypeScript The following are the dependencies of my own "dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/netlify": "^5.5.4",
"@astrojs/react": "^3.6.3",
"@astrojs/tailwind": "^5.1.4",
"@fontsource-variable/archivo": "^5.1.1",
"@fontsource-variable/fira-code": "^5.1.1",
"@fortawesome/fontawesome-svg-core": "^6.7.2",
"@fortawesome/free-brands-svg-icons": "^6.7.2",
"@fortawesome/free-regular-svg-icons": "^6.7.2",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@fortawesome/react-fontawesome": "^0.2.2",
"@nanostores/persistent": "^0.10.2",
"@nanostores/react": "^0.8.4",
"@nextui-org/react": "^2.6.11",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"astro": "^4.16.18",
"astro-seo": "^0.8.4",
"framer-motion": "^11.16.1",
"nanostores": "^0.11.3",
"node-emoji": "^2.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwindcss": "^3.4.17",
"typescript": "~5.5.4"
} |
NextUI Version
2.6.11
Describe the bug
Using the
Select
component (and some other components as well, fyi, likeListbox
) results in the following error being returned.This only appears to affect some components, not all of them... components like
Card, Button
etc works fine (it seems to me).When I "go to definition" and into the types for the Select, I see no
children
property. I see a lot of properties as indicated in documentation, but even code search yields no results forchildren
.Your Example Website or App
https://github.com/doshexchnage/nextui-testing/blob/8a4866cb038dccd05ad305676c1cd19d287899d4/app/screens/main.tsx#L8-L14
Steps to Reproduce the Bug or Issue
React 19.0.0
TailwindCSS 3.4.17
Webpack 5.97.1
Typescript 5.7.3
Expected behavior
Expect it to work as described in the docs 😄 or if the usage changed, to have that reflected in docs 😄
Screenshots or Videos
Operating System Version
Arch Linux
Browser
Chrome
The text was updated successfully, but these errors were encountered: