Error: EISDIR: illegal operation on a directory

iOS真机联调红屏报错Error: EISDIR: illegal operation on a directory的解决方案
报错信息

Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (fs.js:568:3)
    at tryReadSync (fs.js:353:20)
    at Object.readFileSync (fs.js:390:19)

临时解决方案:摇一摇iPhone,弹出debug菜单,倒数第二项点进去,分别输入PC端ip地址,8081,index,然后再reload就可以了
问题根源在debug模式没有找到index bundle文件,检查iOS原生部分jsCodeLocation的获取是否有问题,例如下面的获取方式里index是否写成了index.ios的老版本写法

jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"ind
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章