You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Expo构建失败:安装react-native-pdf时无法解析指定插件

解决"Failed to resolve plugin @config-plugins/react-native-blob-util"构建错误
  • 安装缺失的config插件
    你可能只安装了react-native-blob-util,但未安装对应的Expo config插件,执行以下命令安装:

    # npm
    npm install @config-plugins/react-native-blob-util --save-dev
    
    # yarn
    yarn add @config-plugins/react-native-blob-util --dev
    
  • 验证插件配置正确性
    确认app.json(或app.config.js)中的plugins数组配置无拼写错误,当前配置是正确的:

    "plugins": [
      "@config-plugins/react-native-blob-util",
      "@config-plugins/react-native-pdf"
    ]
    
  • 清除缓存并重新构建
    清理旧构建缓存后重新执行构建:

    # 清除Expo预构建缓存
    npx expo prebuild --clean
    
    # 可选:清除包管理器缓存
    npm cache clean --force
    # 或 yarn cache clean
    
  • 检查版本兼容性
    确保react-native-pdf、@config-plugins/react-native-pdf、react-native-blob-util以及Expo SDK版本相互兼容,避免因版本不匹配导致的插件解析失败。

内容的提问来源于stack exchange,提问作者vixplays

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 09:40:02