Skip to content
Home » Uncaught Error: Cannot find module ‘react/jsx-runtime’

Uncaught Error: Cannot find module ‘react/jsx-runtime’

To solve Uncaught Error: Cannot find module ‘react/jsx-runtime’ follow any of the below methods.

Error log

ERROR in /.../component-library/dist/index.es.js
Module not found: Error: Can't resolve 'react/jsx-runtime' in '/.../component-library/dist'
 @ /...component-library/dist/index.es.js

How to solve Uncaught Error: Cannot find module ‘react/jsx-runtime’ ?

Uncaught Error: Cannot find module ‘react/jsx-runtime’

There was a problem with the symlink. I was able to address the problem by running yarn unlink and yarn link. The package is now properly bundling. If it doesn’t work run:

npm install

Hope it solves the error.

Also Read:
TypeError: Failed to execute ‘createObjectURL’ on ‘URL’: Overload resolution failed

Tags: