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
相关产品推荐
相关产品推荐

