Bug report
Yes
Yes
Yes
N/A
Yes
No
Environment:
"react": "16.6.3",
"react-native": "0.58.0-rc.2",
"react-native-render-html": "^3.10.0"
Target Platform:
N/A
react-native-render-html makes the app fail at runtime because it cannot find imports ViewStylesPropTypes nor ImageStylesPropTypes (in HTMLUtils.js).
React Native 0.58.0-rc.2 has deprecated both ViewStylesPropTypes and ImageStylesPropTypes,
but they can still be used importing like so in HTMLUtils.js:
import ViewStylesPropTypes from 'react-native/Libraries/DeprecatedPropTypes/DeprecatedViewStylePropTypes';
import ImageStylesPropTypes from 'react-native/Libraries/DeprecatedPropTypes/DeprecatedImageStylePropTypes';
App should work with React Native 0.58.0
error: bundling failed: Error: Unable to resolve module react-native/Libraries/Image/ImageStylePropTypes from /home/xipgroc/workspace/XipgrocApp/node_modules/react-native-render-html/src/HTMLUtils.js: Module react-native/Libraries/Image/ImageStylePropTypes does not exist in the Haste module map
PR #201
When I try to deploy a project, I still have this problem. Can someone help?
Full Environment:
"dependencies": {
"axios": "^0.18.0",
"lru-memoize": "^1.0.2",
"prop-types": "^15.6.2",
"react": "16.6.3",
"react-native": "0.58.4",
"react-native-elements": "^1.0.0-beta7",
"react-native-fast-image": "^5.1.2",
"react-native-gesture-handler": "^1.0.12",
"react-native-keychain": "^3.0.0",
"react-native-remote-svg": "^1.4.0",
"react-native-render-html": "^4.0.0",
"react-native-scrollable-tab-view": "^0.10.0",
"react-native-snap-carousel": "^3.7.5",
"react-native-splash-screen": "^3.1.1",
"react-native-svg": "^9.0.0",
"react-native-touch-id": "^4.3.0",
"react-native-vector-icons": "^6.1.0",
"react-navigation": "^3.0.9",
"react-navigation-transitions": "^1.0.8",
"react-redux": "^6.0.0",
"redux": "^4.0.1",
"redux-form": "^8.1.0",
"redux-persist": "^5.10.0",
"reselect": "^4.0.0"
},
"devDependencies": {
"@babel/plugin-transform-react-jsx-source": "^7.2.0",
"babel-eslint": "^10.0.1",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "24.1.0",
"babel-plugin-module-resolver": "^3.1.3",
"eslint": "^5.12.0",
"eslint-plugin-react": "^7.12.3",
"eslint-plugin-react-native": "^3.6.0",
"jest": "24.1.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3",
"react-native-debugger": "^1.1.0",
"redux-devtools-extension": "^2.13.7"
},
Issue:
Unable to resolve module react-native/Libraries/DeprecatedPropTypes/DeprecatedViewStylePropTypes from /Users/vagrant/git/node_modules/react-native-render-html/src/HTMLUtils.js: Module react-native/Libraries/DeprecatedPropTypes/DeprecatedViewStylePropTypes does not exist in the Haste module map
This has been fixed in version 4.0. If you're using react-native 0.58 and above, please update.
@dmitriy-saltovskiy try to clean your packager's cache. This looks like a bundle problem. You should be fine, based on the versions you're using.
FYI the change made broke this package for anyone using React Native <58.0. Might want to consider using conditional imports for situations like this. I would love to use the changes in this package in version 4.1.0 but I can not because I am waiting for the later versions of React Native to become more stable before upgrading.
@KalebMatthews I merged this because this was blocking for too much people. I plan on restoring the backwards compatibility next week.
v4.1.1 has restored backwards compatibility.
Most helpful comment
PR #201