close

[Fixed] Module not found: Error: Can’t resolve ‘react/jsx-runtime’

Today We are Going To Solve Module not found: Error: Can’t resolve ‘react/jsx-runtime’ in Reactjs. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.

How to Fix Module not found: Error: Can’t resolve ‘react/jsx-runtime’ Error?

  1. How to Fix Module not found: Error: Can’t resolve ‘react/jsx-runtime’ Error?

    To Fix Module not found: Error: Can’t resolve ‘react/jsx-runtime’ Error just Update react. You can solve this error by updating react Version. For this you can use the given below command. npm install --save [email protected]

  2. Module not found: Error: Can’t resolve ‘react/jsx-runtime’

    To Fix Module not found: Error: Can’t resolve ‘react/jsx-runtime’ Error just Chnage tsconfig. This solution is only for the users who are using React 17. Here you have to just Change this following tsconfig. "jsx": "react-jsx" And your error will be solved.

Solution 1 : Update react

You can solve this error by updating react Version. For this you can use the given below command.

npm install --save [email protected]

Solution 2 : Chnage tsconfig

This solution is only for the users who are using React 17. Here you have to just Change this following tsconfig.

"jsx": "react-jsx"

And your error will be solved.

Solution 3 : Use React 17 with library and repository

To solve this error you have to use React 17 with library and repository with this command:

"jsx": "react-jsx"

And your error will be removed.

Conclusion

So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.

Also Read This Solutions

1 thought on “[Fixed] Module not found: Error: Can’t resolve ‘react/jsx-runtime’”

Leave a Comment