Firebase部署问题。正在运行的命令:npm--前缀$RESOURCE\u DIR run lint
在firebase项目上部署3个简单函数以开始使用,并在部署后期待它们各自的url,但没有得到url 以下是代码:Firebase部署问题。正在运行的命令:npm--前缀$RESOURCE\u DIR run lint,firebase,google-cloud-functions,facebook-webhooks,Firebase,Google Cloud Functions,Facebook Webhooks,在firebase项目上部署3个简单函数以开始使用,并在部署后期待它们各自的url,但没有得到url 以下是代码: const functions = require('firebase-functions'); // // Create and Deploy Your First Cloud Functions // // https://firebase.google.com/docs/functions/write-firebase-functions // exports.helloW
const functions = require('firebase-functions');
// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
exports.helloWorldOne = functions.https.onRequest((request, response) => {
response.send("Hello 1 from Firebase!");
});
exports.helloWorldTwo = functions.https.onRequest((request, response) => {
response.send("Hello 2 from Firebase!");
});
exports.helloWorldThree = functions.https.onRequest((request, response) =>{
response.send("Hello 3 from Firebase!");
});
- Deleting "npm --prefix \"$RESOURCE_DIR\" run lint".
- Deleting complete "predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint"
]
输出:
const functions = require('firebase-functions');
// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
exports.helloWorldOne = functions.https.onRequest((request, response) => {
response.send("Hello 1 from Firebase!");
});
exports.helloWorldTwo = functions.https.onRequest((request, response) => {
response.send("Hello 2 from Firebase!");
});
exports.helloWorldThree = functions.https.onRequest((request, response) =>{
response.send("Hello 3 from Firebase!");
});
- Deleting "npm --prefix \"$RESOURCE_DIR\" run lint".
- Deleting complete "predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint"
]
D:\IOT\DialogFlow\firebase函数>firebase部署
==部署到“fir-functions-22d02”
我正在部署功能
运行命令:npm——前缀。/functions/run lint
functions@lint D:\IOT\DialogFlow\firebase functions\functions
埃斯林特
- 功能:已完成运行predeploy脚本。 i功能:确保启用必要的API
- 功能:启用所有必要的API i函数:正在准备要上载的函数目录
- 部署完成
const functions = require('firebase-functions');
// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
exports.helloWorldOne = functions.https.onRequest((request, response) => {
response.send("Hello 1 from Firebase!");
});
exports.helloWorldTwo = functions.https.onRequest((request, response) => {
response.send("Hello 2 from Firebase!");
});
exports.helloWorldThree = functions.https.onRequest((request, response) =>{
response.send("Hello 3 from Firebase!");
});
- Deleting "npm --prefix \"$RESOURCE_DIR\" run lint".
- Deleting complete "predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint"
]
将代码替换为以下内容:
- {
"functions": {
"predeploy": [
"npm --prefix ./functions/ run lint"
"npm --prefix ./functions/ run build"
]
}
}
- {
"functions": {
"predeploy": [
"npm --prefix ./functions/ run lint"
]
}
}
它们都不起作用。我只是从代码中删除了注释,然后重新部署。成功了 以下是输出: functions@lint D:\IOT\DialogFlow\firebase functions\functions 埃斯林特
- 功能:已完成运行predeploy脚本。 i功能:确保启用必要的API
- 功能:启用所有必要的API i函数:正在准备要上载的函数目录。。。 i函数:用于上传的打包函数(53.58 KB)
- 功能:已成功上载功能文件夹 i函数:创建Node.js 6函数helloWorld(us-central1)。。。 i函数:更新Node.js 6函数helloWorldTwo(us-central1)
- 部署完成李>
项目控制台:您的函数很可能未被识别为HTTP触发函数。如果您希望获得有关疑难解答的帮助,请在问题中添加最少的代码(下面有一个编辑链接)。