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

Can't resolve 'react/jsx-runtime' #2230

Closed
matine opened this issue Nov 13, 2020 · 11 comments
Closed

Can't resolve 'react/jsx-runtime' #2230

matine opened this issue Nov 13, 2020 · 11 comments

Comments

@matine
Copy link

matine commented Nov 13, 2020

Hi. I'm using create-react-app with typescript and storybook and I've just installed react-data-grid and @types/react-data-grid which went smoothly. But when I create a very basic data grid component based on your example on your website and added it to storybook, my code doesn't compile and I get the following error

Module not found: Error: Can't resolve 'react/jsx-runtime' in '/node_modules/react-data-grid/lib'

I tried to update to the latest CRA but that didn't help.

I also found this commit from 4 days ago that could be something to do with it 5d75c6a

@nstepien
Copy link
Contributor

nstepien commented Nov 13, 2020

Depends on facebook/react#20235
We might have to revert to the old jsx runtime if it cannot be fixed upstream quickly enough.
For now you can try downgrading to a previous canary version. 7.0.0-canary.30 should be good.
Also, @types/react-data-grid isn't necessary, we ship our own types for newer versions.

@matine
Copy link
Author

matine commented Nov 16, 2020

Thanks for your speedy response. The older version works for now 👍

@matine matine closed this as completed Nov 16, 2020
@ckeboss
Copy link

ckeboss commented Feb 18, 2021

Any update on this?

@ekeuus
Copy link
Contributor

ekeuus commented Feb 19, 2021

Any update on this?

I fixed it by updating react to 16.14

@ghost
Copy link

ghost commented Feb 26, 2021

same problem.

@maximborisov
Copy link

maximborisov commented Feb 26, 2021

This helped me fix the problem

@nomanoff
Copy link

nomanoff commented Mar 9, 2021

I had the same issue with react-dnd.
The solution was to use older version of react-dnd
this:
image

@denis-597
Copy link

denis-597 commented Sep 22, 2021

Well, I solved my problem by replacing the versions of these dependencies in the package.json file:

    "react-dom": "latest",
    "react": "latest",
    "@mui/material": "latest",
    "@emotion/styled": "latest",
    "@emotion/react": "latest"

@harshmauny
Copy link

what is the best solution for this problem

@Fer4code
Copy link

Fer4code commented Dec 6, 2021

Well, I solved my problem by replacing the versions of these dependencies in the package.json file:

    "react-dom": "latest",
    "react": "latest",
    "@mui/material": "latest",
    "@emotion/styled": "latest",
    "@emotion/react": "latest"

This helped me out

@shayan2601
Copy link

Well, I solved my problem by replacing the versions of these dependencies in the package.json file:

    "react-dom": "latest",
    "react": "latest",
    "@mui/material": "latest",
    "@emotion/styled": "latest",
    "@emotion/react": "latest"

This helped me out

This solution is showing an error "Invalid hook call...." in react app

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

10 participants