找不到模块'@ firebase/app-types/private' [英] Cannot find module '@firebase/app-types/private'

查看:80
本文介绍了找不到模块'@ firebase/app-types/private'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究Angle,我想在后端使用Firebase.我按照此说明 https://github进行安装. com/angular/angularfire2/blob/master/docs/install-and-setup.md 这是我的package.json

I have been working on angular and i wanted to use firebase for back end. I install angular fire following this instruction https://github.com/angular/angularfire2/blob/master/docs/install-and-setup.md here is my package.json

"angularfire2": "^5.0.0-rc.4",
"firebase": "^4.8.1",

我正面临这个问题.有人可以帮我吗?

I am facing this problem. Can anyone help me with this?

ERROR in node_modules/@firebase/database/dist/esm/src/api/Database.d.ts(4,33): error TS2307: Cannot find module '@firebase/app-types/private'.  node_modules/@firebase/database/dist/esm/src/core/AuthTokenProvider.d.ts(17,39): error TS2307: Cannot find module '@firebase/app-types/private'.

推荐答案

将Firebase版本更改回4.8.0.从4.8.0升级到4.8.1后,类型定义出现问题,并且不再起作用.

Change your firebase version back to 4.8.0. There was an issue in type definitions and its no longer work after updating from 4.8.0 to 4.8.1.

因此请更改package.json文件中的版本.删除^

So change the version in the package.json file. remove the ^

"angularfire2": "^5.0.0-rc.4",
"firebase": "4.8.0",

现在执行npm install命令.这将安装4.8.0版本

Now execute the npm install command. This will install the 4.8.0 version

有关更多信息,请参考.

For further info refer this and this.

这篇关于找不到模块'@ firebase/app-types/private'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆