我正在使用react原生firebase指南在我的react原生应用中安装firebase:https://rnfirebase.io/#2-android-setup
安装已成功,firebase已连接到我的应用程序。
然而,当我尝试从SDK导入时,我得到了一个找不到的错误:
import firebase from 'react-native-firebase'错误为:
Undefined Unable to resolve module 'react-native-firebase' from 'App.js'...按照文档的指示,我只是像这样使用npm install:
npm install --save @react-native-firebase/app并且确实安装了该包。那么可能的原因是什么呢?它不再是SDK了吗?
发布于 2020-04-15 00:47:37
步骤1.清除watchman watches: watchman watch-del-all
步骤2.删除安装文件夹: rm -rf node_modules && npm node_modules
步骤3.重置打包缓存: npm start - Reset -cache
https://stackoverflow.com/questions/61212172
复制相似问题