因项目需要,开始写RN。刚开始本地开始写,后来整理传到SVN,换了一个目录,导致有些文件路径错误,用Xcode可以正常运行,但是用命令行
react-native run-ios
运行,会报错:
error: PCH was compiled with module cache path '/Users/ralbatr/Documents/xxx/ios/build/ModuleCache/1MFRCF6CI603D',but the path is currently
'/Users/ralbatr/Documents/AboutWork/xxx/ios/build/ModuleCache/1MFRCF6CI603D'
解决方法: 进入目录/Users/ralbatr/Documents/AboutWork/xxx/ios/build/ModuleCache,删除目录下的文件,即可。