【问题标题】:react-native-fetch-blob link FAILEDreact-native-fetch-blob 链接失败
【发布时间】:2018-04-16 05:37:04
【问题描述】:

如何解决我的错误。我需要从我的资产文件夹中显示一个 pdf。我正在使用 expo、react native、react-native-pdf

Scanning folders for symlinks in C:\Users\kjdelacruz\mobile\cdo-mobile-organizer\node_modules (31ms)
RNFetchBlob checking app version ..
RNFetchBlob detected app version => 6
Add Android permissions => false
react-native-fetch-blob link FAILED
Could not automatically link package :TypeError: path must be a string or Buffer
    at Object.fs.readFile (fs.js:358:11)
    at Object.<anonymous> (C:\Users\kjdelacruz\mobile\cdo-mobile-organizer\node_modules\react-native-fetch-blob\scripts\prelink.js:29:8)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3please follow the instructions to manually link the library : https://github.com/wkh237/react-native-fetch-blob/wiki/Manually-Link-Package

rnpm-install info Linking assets to ios project
rnpm-install ERR! Something went wrong while linking. Error: Cannot read property 'pbxprojPath' of null
Please file an issue here: https://github.com/facebook/react-native/issues

Cannot read property 'pbxprojPath' of null

【问题讨论】:

  • 您是否完成了错误中的任何建议?因为您只显示了错误而不是触发它的代码,所以答案是菠萝

标签: javascript android reactjs pdf react-native


【解决方案1】:

显然rn-fetch-blob 与expo 不兼容。我之前用 expo 和rn-fetch-blob 处理过这个问题。

“它不适用于 Expo,因为 Expo 不支持本地模块链接。就像你说的,你必须从 Expo 中分离才能运行 react-native link react-native-fetch-blob让它工作。”

https://docs.expo.io/versions/latest/guides/detach.html

您需要使用 XCode 才能使其正常工作。

有几个线程在讨论。不过,世博会没有解决方案。

https://github.com/joltup/rn-fetch-blob/issues/97

https://github.com/wkh237/react-native-fetch-blob/issues/371

【讨论】:

    猜你喜欢
    • 2020-01-20
    • 2021-12-29
    • 2015-07-06
    • 1970-01-01
    • 2018-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多