我们已经使用 react (16.9.0) 将我们的 react native 项目升级到了最新的 react native 版本 (v0.61.2),它在 android 上运行良好。当我们尝试在 ios think 上运行它时,我们得到以下消息:
warning: the transform cache was reset. Loading dependency graph, done. error: bundling failed: Error: Unable to resolve module `React` from `ios/Pods/React/Libraries/react-native/react-native.js`: React could not be found within the project or in these directories: node_modules
If you are sure the module exists, try these steps:
1. Clear watchman watches: watchman watch-del-all
2. Delete node_modules: rm -rf node_modules and run yarn install
3. Reset Metro's cache: …
Run Code Online (Sandbox Code Playgroud)