【React native】 平时经常遇到的报错 - Go语言中文社区

【React native】 平时经常遇到的报错


Error loading page Domain: WebKitErrorDomain Error Code: 101

使用 WebView 组件,loading的过程中出现这个错误。

 

 

解决方案: webVIew 里面

 

renderError={ (e) => {
                        if (e === 'WebKitErrorDomain') {
                            return
                        }
                      }
                    }

 

参考:https://github.com/facebook/react-native/issues/9037

 

React native ERROR Packager can't listen on port 8081

这个问题,其实就是端口和正在运行的程序的端口冲突了,最简单的办法就是把正在运行的项目停掉,然后重新对当前的项目npm start。也可以用终端代码操作:

$ react-native start --port=8088
$ netstat -a -b -o
$ taskkill /pid 1234


参考:https://stackoverflow.com/questions/43425754/react-native-error-packager-cant-listen-on-port-8081

初始化React-native,执行run-ios报错了

错误信息:

** BUILD FAILED **



The following commands produced analyzer issues:
    Analyze /Users/scdzs5/wh/project/hpApp/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
    Analyze /Users/scdzs5/wh/project/hpApp/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c
(2 commands with analyzer issues)

The following build commands failed:
    PhaseScriptExecution Install Third Party /Users/scdzs5/wh/project/hpApp/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/hpApp.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/hpApp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

解决方案:

删除node-modules文件夹,修改pakage.json文件,然后执行 npm install

 

 

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/Riven_wn/article/details/78044120
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-06-27 22:33:49
  • 阅读 ( 1235 )
  • 分类:

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢