tbleckert / react-select-search

⚡️ Lightweight select component for React
https://react-select-search.vercel.app
MIT License
678 stars 147 forks source link

npm install the package & get this error for some reason #168

Closed bigbadbrad closed 3 years ago

bigbadbrad commented 3 years ago

./node_modules/react-select-search/dist/esm/SelectSearch.js Module not found: Can't resolve 'react/jsx-runtime' in '/Users/bradmeinert/Documents/GitHub/fp-client/node_modules/react-select-search/dist/esm'

DavidWells commented 3 years ago

I am also seeing this 😅

For some context, this is in older react 16 CRA

 "peerDependencies": {
    "react": "^16.0.0"
  },
  "devDependencies": {
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-scripts": "^3.4.1"
  },
bigbadbrad commented 3 years ago

Yes I'm using the same react. I get this error when I simply import the package-

import SelectSearch from 'react-select-search';

joeyparis commented 3 years ago

I am also getting this error on react-select-search@3.0.1 with React@^16.13.1. Definitely appears to be because of needing React 17

icaroscherma commented 3 years ago

As @tbleckert stated on issue #175 :

@GitanjaliCS I see, version v3 only supports the new JSX transform as of now. How are you transforming jsx right now? Babel?

So in other words, a newer version of React and it's needed or a "manual" JSX transformation is required.