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

Example from README is not working #5

Closed
rannn505 opened this issue Jun 14, 2022 · 22 comments
Closed

Example from README is not working #5

rannn505 opened this issue Jun 14, 2022 · 22 comments

Comments

@rannn505
Copy link

Im using create react app v5.0.1 with react v17.0.2 and getting
image

@albingroen
Copy link
Owner

Hi, do you mind posting a reproducible repository or a code sandbox?

@rannn505
Copy link
Author

@albingroen not sure whats the difference (except sandbox is JS and local is TS) here but I couldn't reproduce it over there
https://codesandbox.io/s/angry-gauss-rcz3j8?file=/src/App.js

Im not sure why I getting this error but maybe a bit of a research on what is the root cause of such an error can help us here

@albingroen
Copy link
Owner

@albingroen not sure whats the difference (except sandbox is JS and local is TS) here but I couldn't reproduce it over there https://codesandbox.io/s/angry-gauss-rcz3j8?file=/src/App.js

Im not sure why I getting this error but maybe a bit of a research on what is the root cause of such an error can help us here

I think it might be a React 18 issue. The sandbox seems to be using v17. Which version are you using?

@honzasusek
Copy link

@albingroen Getting the exact same error here on React 17.0.2. Will try to reproduce in sandbox.

@albingroen
Copy link
Owner

@albingroen Getting the exact same error here on React 17.0.2. Will try to reproduce in sandbox.

Are you using create-react-app?

@honzasusek
Copy link

@honzasusek Yeah, version 5.0.0 + typescript 4.6.2.

@rannn505
Copy link
Author

rannn505 commented Jun 14, 2022

Im using create react app v5.0.1 with react v17.0.2 and getting image

@albingroen just mentioned it in the initial comment.

I assume that the issue comes from parts in the code that are not backward compatible with react 17 ...
let us know if we can help ... and thanks 🙏🏽

@albingroen
Copy link
Owner

For some weird reason, it works in codesandbox but not locally. Just tried downloading the zip and running it, but I'm running in to the same issue...

@rannn505
Copy link
Author

@albingroen any progress here? do you need help?

@albingroen
Copy link
Owner

@albingroen any progress here? do you need help?

Not really any progress. Would love some help!

@honzasusek
Copy link

honzasusek commented Jun 16, 2022

@albingroen Not sure if this will help, but I just copied the package contents over to our repo, fixed the imports and it seems to be running just fine like that. Could this be a build-related issue? That might explain why codesandbox is working fine with the same setup.

@albingroen
Copy link
Owner

@albingroen Not sure if this will help, but I just copied the package contents over to our repo, fixed the imports and it seems to be running just fine like that. Could this be a build-related issue? That might explain why codesandbox is working fine with the same setup.

Hmm, that sounds really weird...

@albingroen
Copy link
Owner

@honzasusek Do you mind putting up that repo or inviting me to it so I can see it?

@honzasusek
Copy link

@albingroen I'm afraid that isn't possible, but I think I could at least share our tsconfig.json, package.json + a general outline of our setup over PM.

@albingroen
Copy link
Owner

@honzasusek Alright, you can DM me here

@honzasusek
Copy link

@albingroen no twitter account, sorry, sent you an email instead 👴

@dutziworks
Copy link

I was able to reproduce on a simple CRA project:

npx create-react-app my-project --template typescript
yarn add react-cmdk
yarn start

Then add the code from the readme into the app.

@dutziworks
Copy link

Also, I'm adding these tags so people will find this issue easily:

Uncaught TypeError: Cannot read properties of undefined (reading 'Child')

@carbonrider
Copy link

Having same issue with React 18 on local machine. It is not working and throwing

Uncaught TypeError: Cannot read properties of undefined (reading 'Child')

@carbonrider
Copy link

It seems there is an ongoing discussion about React 18 and Transition component compatibility. I see react-cmdk using Transition component. Check the details here.

tailwindlabs/headlessui#681

@albingroen
Copy link
Owner

I don't have the capacity to solve this, unfortunately, so I will close this for now :/

@tanmayairbase
Copy link

facing the same issue as well, also was working on codesandbox

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

6 participants