这个错误发生在我更新了firebase函数和firebase-admin之后
"firebase-functions": "^2.0.4",
"firebase-admin": "^6.0.0"完全错误
Error: Error occurred while parsing your function triggers.
Error: Failed to import the Cloud Firestore client library for Node.js. Make sure to install the "@google-cloud/firestore" npm package. Original error: Error: Cannot find module 'protobufjs/minimal'这是我拥有的所有依赖项
"axios": "^0.18.0",
"compose-middleware": "^4.0.0",
"cors": "^2.8.4",
"cuid": "^1.3.8",
"exponent-server-sdk": "^2.3.1",
"express": "^4.15.4",
"firebase": "^4.13.1",
"firebase-admin": "^6.0.0",
"firebase-functions": "^2.0.4",
"lodash": "^4.17.4",
"moment": "^2.22.2",
"query-string": "^6.1.0"

发布于 2018-08-13 10:35:00
也许可以回滚到v5/v1?对于云函数和firestore交互,您需要的全部内容如下所示。
var admin = require('firebase-admin');
var functions = require('firebase-functions');下面是我的package.json显示的内容,我的东西工作得很好:
"firebase-admin": "^5.12.0",
"firebase-functions": "^1.0.2",发布于 2018-08-13 11:51:26
用npm install或npm update installing丢失的protobufjs包怎么样?甚至可以显式地添加"protobufjs": "^6.8.8" -或者使用npm install protobufjs安装它
https://stackoverflow.com/questions/51814141
复制相似问题