本文介绍了react-native cli:启动时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照说明安装了 react-native 但在

I installed react-native as per the instructions but on

$npm start

出现以下错误.

ERROR  Metro Bundler can't listen on port 8081
Loading dependency graph...
npm ERR! Darwin 17.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.8.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 11
npm ERR! [email protected] start: `node node_modules/react-native/local-
cli/cli.js start`

我猜有某种依赖或冲突,有谁知道我如何才能弄清楚它是什么?

I guess there is some sort of dependency or conflict, does anyone know how I can figure out what it is?

推荐答案

我猜 8081 端口在某处使用尝试杀死端口并再次运行

i guess port 8081 is used somewhere try to kill port and run again

在 Mac 上查找(并杀死)进程锁定端口 3000

这篇关于react-native cli:启动时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 15:13