错误:在 React Native 中找不到本机模块“ExpoBarCodeScanner”(v 0.64.3)

问题描述 投票:0回答:1

我一直在开发一个遗留的 React Native 项目(React Native 版本 0.64.3),我正在尝试安装库 expo-barcode-scanner,但是安装后如果我导入包,它会抛出一个错误“错误:找不到本机模块‘ExpoBarCodeScanner’”

Expo版本是6.7.3。 我安装的unimodules版本是0.11.0。 请指教。

到目前为止,我已尝试将 expo-barcode-scanner 库版本从 12.x 降级到 9.x,但它无法正常工作,并且会引发子模块“@unimodules/react-native-adaptor”的错误。 我还尝试删除节点模块文件夹并重新安装所有节点包。

node.js react-native expo node-modules package.json
1个回答
0
投票

如果您想在 React Native 应用程序中使用 expo 库,您可能需要将 expo 包添加到您的项目中(以前称为 unimodules

© www.soinside.com 2019 - 2024. All rights reserved.