我正在尝试部署从 db 事件触发的 Google Cloud 函数触发器,但是当我运行时,firebase deploy这些函数没有正确部署,我收到一条错误消息Error: Cannot find module firebase
当我第一次创建项目时,我可以毫无问题地部署功能。我上次部署任何东西已经有几天了,但现在我的所有功能(不仅仅是我的触发器功能)都遇到了这个问题
我的功能:
exports.deleteNotificationOnUnlike = functions
.region("us-central1")
.firestore.document("likes/{id}")
.onDelete((snapshot) => {
return db
.doc(`/notifications/${snapshot.id}`)
.delete()
.catch((err) => console.error(err));
});
Run Code Online (Sandbox Code Playgroud)
包.json
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"serve": "firebase serve --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "8"
},
"dependencies": {
"busboy": "^0.3.1",
"firebase-admin": "^8.0.0",
"firebase-functions": "^3.1.0"
},
"devDependencies": { …Run Code Online (Sandbox Code Playgroud) firebase firebase-realtime-database google-cloud-functions google-cloud-firestore
我最近在Ubuntu 18.04上安装了Android Studio,以便为Android进行一些本机C ++开发。在编译需要cmake 3.9或更高版本的项目(由于cmake依赖关系)时,我发现Android Studio安装的cmake版本仅为3.6版本。是否有一种干净的方法可以通过SDK Manager升级与Android Studio一起安装的cmake版本?
我正在运行Android Studio版本3.1.3,并从SDK Manager-> SDK工具安装了cmake。