美文网首页
React-native 常见错误解决

React-native 常见错误解决

作者: 深山问 | 来源:发表于2018-10-18 10:31 被阅读43次

1. Requiring unknown module "xxx"

npm start 重启packager
Requiring unknown module

2. 卡在“Building xx Rect | Running 1 of 2 custom shell scripts”

npm run reset 

或者

   watchman watch-del-all
   rm -rf node_modules && npm install
   npm start -- --reset-cache

3. 'CodePush/CodePush.h' file not found

切换分支后总是Build失败,之前是好的,正确的方法是

执行 npm run dev:ios-max 或者 npm run dev:ios, 这才是正确的姿势

4. double-conversion issues

cd node_modules/react-native/scripts && ./ios-install-third-party.sh && cd ../../../
cd node_modules/react-native/third-party/glog-0.3.5/ && ../../scripts/ios-configure-glog.sh && cd ../../../../

相关文章

网友评论

      本文标题:React-native 常见错误解决

      本文链接:https://www.haomeiwen.com/subject/gjdjzftx.html