我在firebase安装模块的情况下部署云功能时收到以下错误(如下图所示).
我已经尝试安装@types/firebase并firebase收到相同的错误.我敢肯定,这个错误有事情做与此模块,因为当两个firebase和@types/firebase卸载后,功能部署正确.
此外,云功能还没有调用此模块,因此我认为错误不在函数中.我已经为我的package.json文件和ts.config文件提供了代码.知道为什么我会收到此错误以及如何导入模块而不会出现此错误?如果还有另一个值得审核的文件,请告诉我.谢谢.
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"lint": "./node_modules/.bin/tslint -p tslint.json",
"serve": "firebase serve --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log",
"build": "./node_modules/.bin/tsc"
},
"dependencies": {
"dom": "0.0.3",
"expo-server-sdk": "^2.4.0",
"firebase-admin": "~5.12.1",
"firebase-functions": "^1.0.3",
"typescript": "^2.9.2"
},
"devDependencies": {
"eslint": "^4.12.0",
"eslint-plugin-promise": "^3.6.0",
"ts-loader": "^4.4.2"
},
"main": "lib/index.js",
"private": …Run Code Online (Sandbox Code Playgroud)