You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If react-native and react-native-windows installed together - the modules from latter considered being generic(g) by the packager(jest-haste-map). As result, we have broken app.
in the generated index.ios.js make a small modification so the render method of default exported component will look like that:
render(){return(<Viewstyle={styles.container}><Textstyle={styles.welcome}><Textstyle={styles.instructions}>
To get started, edit index.ios.js
</Text></Text></View>);}
react-native run-ios
ㅠㅠ
Solution
During investigating this, read a lot of code and eventually come to jest-haste-map - the one which required by react-native.
In the react-native packager defaults.js here is platforms array exported, looks like dat:
adding windows: true, to SUPPORTED_PLATFORM_EXTS dict will give us a fix:
Should I make a PR to jest-haste-map? or this thing was already addressed?
UPD: just in case, PR is below
Additional Information
React Native version: 0.44
Platform: iOS 10.0/10.3
Development Operating System: macOSX 10.12.4(16E195)
Dev tools: Xcode Version 8.3.2 (8E2002) / Simulator Version 10.0 (SimulatorApp-745.10
The text was updated successfully, but these errors were encountered:
nixoz
changed the title
react-native packager(jest-haste-map) module resolution issue with 3rd party lib.
react-native packager(or to be more precise - jest-haste-map) module resolution issue with 3rd party lib.
May 19, 2017
nixoz
added a commit
to nixoz/jest
that referenced
this issue
May 19, 2017
Description
If react-native and react-native-windows installed together - the modules from latter considered being generic(g) by the packager(jest-haste-map). As result, we have broken app.
the initial discussion was started here: #13925
Reproduction Steps and Sample Code
Solution
During investigating this, read a lot of code and eventually come to jest-haste-map - the one which required by react-native.
In the react-native packager defaults.js here is platforms array exported, looks like dat:
at the same time, in jest-haste-map's lib/getPlatformExtension.js we have:
adding windows: true, to SUPPORTED_PLATFORM_EXTS dict will give us a fix:
Should I make a PR to jest-haste-map? or this thing was already addressed?
UPD: just in case, PR is below
Additional Information
The text was updated successfully, but these errors were encountered: