catamphetamine / react-phone-number-input

React component for international phone number input
http://catamphetamine.gitlab.io/react-phone-number-input/
MIT License
924 stars 194 forks source link

Module not found: Error: Package path ./modules/CountryIcon #420

Open pduey opened 1 year ago

pduey commented 1 year ago

After upgrading from version 3.1.53 to version 3.2.0 we start receiving this error:

Module not found: Error: Package path ./modules/CountryIcon is not exported from package .../node_modules/react-phone-number-input (see exports field in .../node_modules/react-phone-number-input/package.json)

I went through the README and couldn't find any instructions that would seem to fix this. I guess this is just me, since nobody has reported the issue and we're already up to v 3.2.12. Apologies if this is not an issue and just a request for help.

catamphetamine commented 1 year ago

Depends on what path are you importing in your app. If you're importing CountryIcon component from react-phone-number-input/modules/CountryIcon then that wasn't a documented feature. Version 3.2.0 introduced a new package export system.