0

所以我正在使用firebase和react开发一个应用程序,当我运行npm start测试应用程序时,我得到了很多错误,包括这个

./src/Login.js
Module not found: Can't resolve 'firebase' in '/Users/.../.../.../.../project/src

这(完整的错误太大而无法显示,但这是结束片段):

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.23.3 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the grpc@1.23.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

这是 Login.js 中的导入语句

import * as firebase from "firebase";

重要的是要注意,我正在与朋友一起开发这个应用程序,他们可以npm start毫无问题地运行这个应用程序,甚至使用我拥有的完全相同的代码构建和部署到 firebase 托管。此外,我可以create-react-app毫无问题地运行通过创建的模板 React 应用程序。因此,我认为这要么是我的 NPM 安装问题,要么是我的 Firebase 安装问题,所以我重新安装了两者,但这并没有改变。老实说,我被困住了,我非常感谢任何帮助。

4

0 回答 0