我正在尝试使用
在我们的应用中添加权限模块react-native-permissions@1.0.1
当我试图像这样使用它时:
import Permissions from 'react-native-permissions'
在运行时,我收到以下错误:
file: 'file/RunTimePermissionsExample.js'
severity: 'Error'
message: 'react-native-permissions (Required module not found)'
at: '8,25'
source: 'flow'
我经历过这些问题: https://github.com/facebook/flow/issues/2092, https://github.com/facebook/flow/issues/3875, Flow required module not found 并尝试了不同的方法,如:
module.name_mapper ='(react-native-permissions)' - > “空/对象
module.name_mapper ='(react-native-permissions)' - > '/flow/GeneralStub.js.flow'
将此添加到[lib]
下的.flowconfig声明模块'react-native-permissions'{ declare module.exports:any; }
不幸的是,错误未得到解决。
答案 0 :(得分:0)
通过重建,清理,重新安装一些盲目修复后修复了问题。