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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章