Firebase Cloud Function 报错:无法找到模块 'firebase-functions/v2/auth'
Firebase Cloud Function 报错:无法找到模块 'firebase-functions/v2/auth'
我最近在开发Firebase云函数时碰到了一个问题,当我执行下面这条导入语句时:
import { onDelete } from "firebase-functions/v2/auth";
控制台抛出了这样的错误:
Cannot find module 'firebase-functions/v2/auth' or its corresponding type declarations.
为了解决这个问题,我已经尝试了从其他相关问题里找到的几种方案:
- 删除
node_modules文件夹和package-lock.json文件,然后重新运行npm install - 在项目根目录的
tsconfig.json中添加了"exclude": ["node_modules", "functions"]配置项
备注:内容来源于stack exchange,提问作者Dima Malko
相关产品推荐
相关产品推荐

