美文网首页React Native原理分析
排坑指南 Troubleshooting

排坑指南 Troubleshooting

作者: 千浪 | 来源:发表于2020-08-26 16:56 被阅读0次

    Integration with Existing Apps

    执行yarn start之后出错,显示8081端口被占用

    error listen EADDRINUSE: address already in use :::8081. Run CLI with --verbose flag for more details.
    Error: listen EADDRINUSE: address already in use :::8081
        at Server.setupListenHandle [as _listen2] (net.js:1313:16)
        at listenInCluster (net.js:1361:12)
        at Server.listen (net.js:1447:7)
        at /Users/anql/lab/RNIntegratedApp/node_modules/metro/src/index.js:235:20
        at new Promise (<anonymous>)
        at Object.<anonymous> (/Users/anql/lab/RNIntegratedApp/node_modules/metro/src/index.js:234:14)
        at Generator.next (<anonymous>)
        at asyncGeneratorStep (/Users/anql/lab/RNIntegratedApp/node_modules/metro/src/index.js:46:24)
        at _next (/Users/anql/lab/RNIntegratedApp/node_modules/metro/src/index.js:66:9)
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    

    解决办法 :

    yarn start --port 8088
    adb reverse tcp:8081 tcp:8088
    

    参考:

    相关文章

      网友评论

        本文标题:排坑指南 Troubleshooting

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