1. Execute react-native init AwesomeProject
2.cd AwesomeProject
3.react-native run-ios
saying that the index under this module cannot be resolved
what should I do
a. Look at the project node_modules folder and find that there is a react-tramsform-hmr module below;
b. The error seems to be found in the upper directory of the whole project (/ Users/bocai/Code/ReactNative); the project directory is (/ Users/bocai/Code/ReactNative/AwesomeProject)
c. After initialization, I haven"t changed a word
d.reactMativeMill: 2.0.1 react-native: 0.57.2 is there anything to do with the version number
the problem of the second change has been solved:
solution:
first execute react-native start-- reset-cache
Open a new terminal and then execute react-native run-ios/android
reference address:
https://codeshelper.com/a/11.,
https://github.com/facebook/r.
Picture description