2017-06-30 23 views
5

tôi đang làm hướng dẫn viên mãn cơ bản và thiết lập cuộc nói chuyện của api.ai tutorial để thực hiện một bot cho facebook messenger, và khi tôi cố gắng để triển khai các chức năng bằng lệnh:gcloud triển khai chức năng mã lỗi 3

gcloud beta functions deploy testBot --stage-bucket testbot-e9bc4.appspot.com --trigger-http 

(nơi 'testBot' là tên của dự án và 'testbot-e9bc4.appspot.com' là bucket_name, tôi nghĩ ..) Nó trả lại thông báo lỗi sau:

ERROR: (gcloud.beta.functions.deploy) OperationError: code=3, message=Source code size exceeds the limit 

tôi đã tìm kiếm nhưng không tìm thấy câu trả lời nào, tôi không biết lỗi ở đâu. này là file JS xuất hiện trong hướng dẫn:

/
HTTP Cloud Function. 

@param {Object} req Cloud Function request context. 
@param {Object} res Cloud Function response context. 
*/ 
exports.helloHttp = function helloHttp (req, res) { 
    response = "This is a sample response from your webhook!" //Default response from the webhook to show it's working 


res.setHeader('Content-Type', 'application/json'); //Requires application/json MIME type 
    res.send(JSON.stringify({ "speech": response, "displayText": response 
    //"speech" is the spoken version of the response, "displayText" is the visual version 
    })); 
}; 

Trả lời

-1

mở cửa sổ lệnh tại vị trí nơi index.js được tạo ra và chạy lệnh gcloud trên.

Các vấn đề liên quan