alexkatz / react-tiny-popover

A simple and highly customizable popover react higher order component with no other dependencies! Typescript friendly.
MIT License
444 stars 120 forks source link

Module `react/jsx-runtime` not found #147

Open nuthinking opened 2 years ago

nuthinking commented 2 years ago

After I upgraded from 6.0.5 to 6.0.10 or 7.0.1 I get:

Failed to compile.

./node_modules/react-tiny-popover/dist/Popover.js
Module not found: Can't resolve 'react/jsx-runtime' in '/Users/.../node_modules/react-tiny-popover/dist'

I'm using React 16.8.6

Rollback!

alex-mironov commented 2 years ago

Any plans to fix this?

OpenSource03 commented 2 years ago

+1

libaoxu commented 7 months ago

we can resolve this problem by indirect method, and do not neet update your react packages

  1. add react-jsx-runtime package, link is https://www.npmjs.com/package/react-jsx-runtime
  2. add webpack alias, 'react/jsx-runtime': nodeModulesResolve('react-jsx-runtime'), like as follow example image
JenyaKrasnik commented 6 months ago

@nuthinking @alex-mironov You should update your react version to 17.0.2. It helps me to use react-popover without an error "Can't resolve 'react/jsx-runtime'".