viclafouch / mui-tel-input

📌 A phone number input designed for MUI (Material ui) V6 built with libphonenumber-js
https://viclafouch.github.io/mui-tel-input
MIT License
171 stars 66 forks source link

Version 3.2.0 is not working (in PlayGround and in my project) #79

Closed sfehlandt closed 1 year ago

sfehlandt commented 1 year ago

Hi,

The playground is not working: https://codesandbox.io/s/mui-tel-input-p7b2jz?fontsize=14&hidenavigation=1&theme=dark If I change the version of mui-tel-input from latest to 3.1.3 in package.json it works again.

This also happened in my project (a NextJS app with React 18.2.0) and downgrading fixed the issue.

The error in the playground is this:

 Error
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of `ForwardRef`.
nateschickler0 commented 1 year ago

I was getting the same thing suddenly, but downgrading (to my previous working version, 3.1.1) did not fix the issue, which was strange. Turns out the issue was that I was using the caret "compatible-with" operator in my package.json, like ^3.1.1. However, this automatically installed 3.2.0. I had to change it to 3.1.1 for it to work. Hope this helps someone else and that this is resolved soon.

derek-agent commented 1 year ago

Confirming that we're seeing this in our project as well

carlos-menezes commented 1 year ago

Can confirm this is an issue in our project as well.

viclafouch commented 1 year ago

Does anyone have a repo with a reproduction plz ? A simple project, because I'm trying to reproduce in local, but it's working for me :(

On the PlayGround, I can't access to the node modules

phil-tutti commented 1 year ago

We're experiencing the same on our project, didn't manage yet to create a reproduction yet.

Edit: Maybe this helps:

Whenever I wrap the MuiTelInput with a styled (from material-ui),

const SPhoneInput = styled(
  MuiTelInput
)

I'm getting a Typescript error

TS2604: JSX element type 'SPhoneInput' does not have any construct or call signatures.

so the types seem to be off a bit

MorMeshulam commented 1 year ago

getting the same error when trying to consume the library -> v3.1.1

running on

Screenshot 2023-06-27 at 11 38 19

teobot commented 1 year ago

getting this issue also. even the link on their own website doesn't work,

https://viclafouch.github.io/mui-tel-input/docs/playground/

viclafouch commented 1 year ago

Hello everyone !

Issue has been fixed in https://github.com/viclafouch/mui-tel-input/releases/tag/v3.2.1

Also, playground is working correctly now :)

Thanks everyone