Open sarkar4540 opened 3 years ago
same problem
Same problem nearly a year later.
"dependencies": {
"@expo/webpack-config": "^0.17.0",
"@react-native-async-storage/async-storage": "~1.17.3",
"@react-native-picker/picker": "2.4.2",
"@react-navigation/drawer": "^6.3.1",
"@react-navigation/native": "^6.0.8",
"@react-navigation/native-stack": "^6.5.0",
"axios": "^0.26.1",
"expo": "^46.0.0",
"expo-checkbox": "~2.2.0",
"expo-linear-gradient": "~11.4.0",
"expo-linking": "~3.2.2",
"expo-notifications": "~0.16.1",
"expo-splash-screen": "~0.16.2",
"expo-status-bar": "~1.4.0",
"expo-updates": "~0.14.6",
"formik": "^2.2.9",
"moment": "^2.29.1",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.6",
"react-native-gesture-handler": "~2.5.0",
"react-native-htmlview": "^0.16.0",
"react-native-maps": "0.31.1",
"react-native-reanimated": "~2.9.1",
"react-native-render-html": "^6.3.4",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-web": "~0.18.7",
"react-native-web-maps": "^0.3.0",
"yup": "^0.32.11"
},
HTMLView.js:149 Uncaught TypeError: Cannot read properties of undefined (reading 'style') at Module../node_modules/react-native-htmlview/HTMLView.js (HTMLView.js:149:1) at webpack_require__ (bootstrap:789:1) at fn (bootstrap:100:1) at Module../node_modules/react-native-htmlview/index.js (index.js:1:1) at webpack_require (bootstrap:789:1) at fn (bootstrap:100:1) at Module../reactNativeCode/ProfilePage.js (ProfilePage.js:1:1) at webpack_require (bootstrap:789:1) at fn (bootstrap:100:1) at Module../reactNativeCode/SideBarProfileMenu.js (Reciept.js:198:1) at webpack_require (bootstrap:789:1) at fn (bootstrap:100:1) at Module../App.js (bootstrap:856:1) at webpack_require (bootstrap:789:1) at fn (bootstrap:100:1) at Module../node_modules/expo/AppEntry.js (AppEntry.js:1:1) at __webpack_require (bootstrap:789:1) at fn (bootstrap:100:1) at Object.1 (SignupPage.js:100:1) at __webpack_require__ (bootstrap:789:1) at bootstrap:856:1 at bootstrap:856:1
Issue still exists in web version
for me the issue started when I upgraded the RN version, to solve it I just changed the value from ViewPropTypes.style to PropTypes.object in HTMLView file propTypes
HtmlView.propTypes = { addLineBreaks: PropTypes.bool, bullet: PropTypes.string, lineBreak: PropTypes.string, NodeComponent: PropTypes.func, nodeComponentProps: PropTypes.object, onError: PropTypes.func, onLinkPress: PropTypes.func, onLinkLongPress: PropTypes.func, paragraphBreak: PropTypes.string, renderNode: PropTypes.func, RootComponent: PropTypes.func, rootComponentProps: PropTypes.object, style: PropTypes.object, stylesheet: PropTypes.object, TextComponent: PropTypes.func, textComponentProps: PropTypes.object, value: PropTypes.string, };
JSX Code:
The following error has occurred.