Open reuschj opened 4 years ago
RN062-undefined-style-propType.zip Here is an example project with the error.
https://github.com/react-native-community/releases/issues/157#issuecomment-595963504
Here is an answer that might help fixing this.
I had attempted to make a local copy and fix the above issue by remapping to Text.propTypes. This did fix the problem but revealed a bunch of new style issues. As far as I can see, React Native recently made some changes to Animated.Text that break existing code. Notably, the label is initially showing up at the bottom of the text field and the bottom line is too thick. I didn’t have time to work through these issues and just shelved the RN upgrade for the time being. Getting past the 0.60 hurdle has been quite challenging. A lot of major changes that break modules!
Facing the same issue , any fix found for the above ?
I am facing the same issue, any fix?
I think the only options are to wait for this module to be updated for latest React Native versions (0.60+) before upgrading React Native. I had some limited success making a local copy of the module and trying to patch a few of the fixes. The easy one is to just do so and point the 3 files above to Text.propTypes.style
.. That worked to allow the app to load the app. However, once loaded, the styling was quite broken in a few places. I didn't have time to do much tinkering, so just shelved my RN upgrade for a bit. Essentially, there are also some big under-the-hood changes to Animated.Text in the latest RN versions that break things. I'm sure it wouldn't be too much of a hurdle to work through them... just not one I had time for.
Same error...
Same error
Same Error ....Do we have fix for this....This issues is holding me back from deploying.
TypeError: Cannot read property 'style' of undefined. File - node_modules/react-native-material-textfield/src/components/label/index.js
Exception
Cannot read property 'style' of undefined.
File - node_modules/react-native-material-textfield/src/components/label/index.js
can anyone help us out with this issue?
I have the same issue but i solve it by finding Text.propTypes.style
in node modules react native material dropdown and react native material textfiled and comment it
No one found the answer?
Similar to @farajshuaib, I solved it by changing Text.propTypes.style
to Text?.propTypes?.style
Similar to @farajshuaib, I solved it by changing
Text.propTypes.style
toText?.propTypes?.style
Ofcourse we can do that but it is not a good option to change the installed package. We then have to do it everytime we install the pakage or if we are working in a team.
@IrfanWani123 You could also use https://github.com/ds300/patch-package to patch the package for everybody in your team...
@IrfanWani123 You could also use https://github.com/ds300/patch-package to patch the package for everybody in your team...
@jan-happy I did the same with the react-native for some other errors to tackle.
I just wanted to know, after creating the patch for the package, do other teammates have to make the changes manually by checking the patch or is there any way to automatically add the changes to the node modules after installing the packages?
Hi everyone, unfortunately this is a known bug in react-native-material-textfield
and this lib appears to be abandoned.
I suggest you use this fork rn-material-ui-textfield that has fixed this and some other bugs.
If you want to give it a try just run
npm install --save rn-material-ui-textfield
just upgrading the Rn-0.63.3 to 0.70.5
"react": "18.1.0", "react-native": "0.70.5",
on entering the application throw ERROR ERROR Error: Requiring module "node_modules\react-native-material-ui\index.js", which threw an exception: TypeError: Cannot read property 'style' of undefined, js engine: hermes
ERROR TypeError: Cannot read property 'Toolbar' of undefined and the last ERROR TypeError: Cannot read property 'style' of undefined, js engine: hermes
please do something .........
When upgrading to the latest React Native (0.62.0-rc.3), I get an error message, which leads back to 3 files in the
react-native-material-textfield
package. All seem to point back to the same issue with the latest React Native:Animated.Text.propTypes
is nowundefined
. Here are the three files:label\index.js
:style: Animated.Text.propTypes.style,
helper\index.js
:style: Animated.Text.propTypes.style,
affix\index.js
:style: Animated.Text.propTypes.style,