我试图在我的项目中使用react本机-获取-blob,但是每当我将
import RNFetchBlob from 'react-native-fetch-blob'
我在仿真器上得到一个错误
Cannot read property 'Document Dir' of undefined
我是用
npm i --save react-native-fetch-blob并将其链接到
react-native link错误:
无法读取属性“DocumentDir”的未定义的fs.js:24:31 loadModuleImplementation require.js:214:4 guardedLoadModule require.js:148:11 _require require.js:132:2 index.js:21 loadModuleImplementation require.js:214:4 guardedLoadModule require.js:148:11 _require _require require.js:132:2 App.js:6 loadModuleImplementation require.js:214:4
发布于 2018-10-06 12:16:54
在安装和链接软件包之后。执行以下操作
watchman watch-del-all
npm cache clean --forcerm -f /ios/build (如果您正在为ios构建) rm -f /android/build (如果您正在为android构建)
react-native run-ios `or` react-native run-ios希望它能解决你的问题
https://stackoverflow.com/questions/50617697
复制相似问题