RN调试的坑

我与RN调试的坑,我在学习RN之初准备连上Google去调试js.但是终无法调试成功,一直报Runtime is not readying for Debugger.

一只都无法解决,我在 https://github.com/targetcloud/Meituan 网址上下了别人的demo可以调试成功,我就把他人的项目中的package.json和package-lock.json配置文件copy入我的工程,然后命令行: rm -rf node_modules && npm install。居然神奇的可以了,感谢感谢,至于原因有空再去深纠.


经过多次试验在react-native 0.39.2情况下是可以连chrome调试的,但是一但升级就不行了.最后做了一下两个操作,居然可以成功调试了,也不知道那个生效了:

1.根据https://github.com/facebook/react-native/issues/6682  Monte9所说,node版本只能在6.0.0和6.2.2之间,要不然不兼容

Recently I updated node to v6.7.0 and ran into this exact issue! I tried all the solutions listed on this thread but none of it solved the issue. I then came across this thread: #8668

Hence downgrading to node v6.2 resolved this issue for me.

So check your node version (node -v) and make sure you are using something between v6.0.0 to 6.2.2.

Here's how to update your node version:
sudo npm cache clean -f

sudo npm install -g n

sudo n 6.2


2.下载最新的chrome浏览器.


但是最后我又把node.js升级到最新v8.1.3,但是还是可以调试真是奇葩问题啊,由此推论大概是浏览器版本问题吧!





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值