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
参考:
网友评论