我正在尝试将firebase安装到我的反应本机项目中。为此,我尝试了几种基于少数来源的方法。我打开cmd,移动到项目的目录,并尝试这些:
npm install --save firebase
npm install firebase --save
npm i react-native-firebase --save
但不幸的是,这一切都无法将firebase安装到我的反应原生项目中。对于1号和2号,它说:
npm ERR! Cannot read property 'find' of undefined
对于3号,它说:
npm ERR! path C:\Users\User\AndroidStudioProjects\auth\node_modules\react-native-firebase
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\User\AndroidStudioProjects\auth\node_modules\react-native-firebase' -> 'C:\Users\User\AndroidStudioProjects\auth\node_modules\.react-native-firebase.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
当然,当我尝试导入firebase并运行我的应用程序时,显示错误代码500但无法解析firebase。