質問編集履歴
4
エラー文をより多い分量でコピペして書き換えました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,6 +8,23 @@
|
|
8
8
|
```
|
9
9
|
⚠ functions[helloWorld(us-central1)]: Deployment error.
|
10
10
|
Function failed on loading user code. This is likely due to a bug in the user code. Error message: Error: please examine your function logs to see the error cause: https://cloud.google.com/functions/docs/monitoring/logging#viewing_logs. Additional troubleshooting documentation can be found at https://cloud.google.com/functions/docs/troubleshooting#logging. Please visit https://cloud.google.com/functions/docs/troubleshooting for in-depth troubleshooting documentation.
|
11
|
+
⚠ functions[addMessage(us-central1)]: Deployment error.
|
12
|
+
Function failed on loading user code. This is likely due to a bug in the user code. Error message: Error: please examine your function logs to see the error cause: https://cloud.google.com/functions/docs/monitoring/logging#viewing_logs. Additional troubleshooting documentation can be found at https://cloud.google.com/functions/docs/troubleshooting#logging. Please visit https://cloud.google.com/functions/docs/troubleshooting for in-depth troubleshooting documentation.
|
13
|
+
|
14
|
+
|
15
|
+
Functions deploy had errors with the following functions:
|
16
|
+
addMessage
|
17
|
+
helloWorld
|
18
|
+
|
19
|
+
|
20
|
+
To try redeploying those functions, run:
|
21
|
+
firebase deploy --only "functions:addMessage,functions:helloWorld"
|
22
|
+
|
23
|
+
|
24
|
+
To continue deploying other features (such as database), run:
|
25
|
+
firebase deploy --except functions
|
26
|
+
|
27
|
+
Error: Functions did not deploy properly.
|
11
28
|
```
|
12
29
|
|
13
30
|
### 該当のソースコード
|
3
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,17 +8,13 @@
|
|
8
8
|
```
|
9
9
|
⚠ functions[helloWorld(us-central1)]: Deployment error.
|
10
10
|
Function failed on loading user code. This is likely due to a bug in the user code. Error message: Error: please examine your function logs to see the error cause: https://cloud.google.com/functions/docs/monitoring/logging#viewing_logs. Additional troubleshooting documentation can be found at https://cloud.google.com/functions/docs/troubleshooting#logging. Please visit https://cloud.google.com/functions/docs/troubleshooting for in-depth troubleshooting documentation.
|
11
|
-
⚠ functions[addMessage(us-central1)]: Deployment error.
|
12
|
-
Function failed on loading user code. This is likely due to a bug in the user code. Error message: Error: please examine your function logs to see the error cause: https://cloud.google.com/functions/docs/monitoring/logging#viewing_logs. Additional troubleshooting documentation can be found at https://cloud.google.com/functions/docs/troubleshooting#logging. Please visit https://cloud.google.com/functions/docs/troubleshooting for in-depth troubleshooting documentation.
|
13
11
|
```
|
14
12
|
|
15
13
|
### 該当のソースコード
|
16
14
|
|
17
15
|
```js
|
18
|
-
// The Cloud Functions for Firebase SDK to create Cloud Functions and setup triggers.
|
19
16
|
const functions = require('firebase-functions');
|
20
17
|
|
21
|
-
// The Firebase Admin SDK to access Firestore.
|
22
18
|
const admin = require('firebase-admin');
|
23
19
|
admin.initializeApp();
|
24
20
|
|
@@ -28,15 +24,9 @@
|
|
28
24
|
response.send("Hello from Firebase!");
|
29
25
|
});
|
30
26
|
|
31
|
-
|
32
|
-
// Take the text parameter passed to this HTTP endpoint and insert it into
|
33
|
-
// Firestore under the path /messages/:documentId/original
|
34
27
|
exports.addMessage = functions.https.onRequest(async (req, res) => {
|
35
|
-
// Grab the text parameter.
|
36
28
|
const original = req.query.text;
|
37
|
-
// Push the new message into Firestore using the Firebase Admin SDK.
|
38
29
|
const writeResult = await admin.firestore().collection('messages').add({original: original});
|
39
|
-
// Send back a message that we've successfully written the message
|
40
30
|
res.json({result: `Message with ID: ${writeResult.id} added.`});
|
41
31
|
});
|
42
32
|
```
|
2
なし
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
Cloud Functions(Firebase)への関数デプロイ。エラーで
|
1
|
+
Cloud Functions(Firebase)への関数デプロイ。エラーが解決できません
|
body
CHANGED
File without changes
|
1
なし
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
2
|
|
3
3
|
FirebaseのCloud Functionsに関数をデプロイしたいです。
|
4
|
+
ターミナルで「firebase deploy」を行った結果以下のエラーメッセージが出てしましました。
|
4
5
|
|
5
6
|
### 発生している問題・エラーメッセージ
|
6
7
|
|