Ошибка эмулятора облачных функций Firebase - PullRequest
0 голосов
/ 21 сентября 2018

Я использую эмулятор облачных функций Firebase .Это моя папка scructure

├── firebase.json
├── functions
│   ├── etc
│   ├── index.js
│   ├── package.json
│   ├── src
│   │   ├── ArrayFromObject.ts
│   │   ├── Equations.ts
│   │   └── index.ts
│   ├── tsconfig.json
│   └── tslint.json
└── tree.txt

Если я в главной папке, то на уровне firebase.json и запускаю sudo functions call helloWorld я получаю вот это:

Error: { error:
{ code: 500,
    status: 'INTERNAL',
    message: 'Function worker crashed with exit code: 1\nundefinedWarning, estimating Firebase Config based on GCLOUD_PROJECT. Intializing firebase-admin may fail/usr/local/lib/node_modules/@google-cloud/functions-emulator/src/supervisor/worker.js:80\n      throw new Error(`No function found with name ${cloudfunction.entryPoint || name}`);\n      ^\n\nError: No function found with name helloWorld\n    at process.on (/usr/local/lib/node_modules/@google-cloud/functions-emulator/src/supervisor/worker.js:80:13)\n    at emitTwo (events.js:126:13)\n    at process.emit (events.js:214:7)\n    at emit (internal/child_process.js:772:12)\n    at _combinedTickCallback (internal/process/next_tick.js:141:11)\n    at process._tickCallback (internal/process/next_tick.js:180:9)',
    errors:
    [ 'Function worker crashed with exit code: 1\nundefinedWarning, estimating Firebase Config based on GCLOUD_PROJECT. Intializing firebase-admin may fail/usr/local/lib/node_modules/@google-cloud/functions-emulator/src/supervisor/worker.js:80\n      throw new Error(`No function found with name ${cloudfunction.entryPoint || name}`);\n      ^\n\nError: No function found with name helloWorld\n    at process.on (/usr/local/lib/node_modules/@google-cloud/functions-emulator/src/supervisor/worker.js:80:13)\n    at emitTwo (events.js:126:13)\n    at process.emit (events.js:214:7)\n    at emit (internal/child_process.js:772:12)\n    at _combinedTickCallback (internal/process/next_tick.js:141:11)\n    at process._tickCallback (internal/process/next_tick.js:180:9)' ] } }

иЯ понятия не имею, что здесь не так.

Если я запускаю sudo функции start, я получаю это:

Google Cloud Functions Emulator RUNNING
┌────────┬────────────┬─────────┬────────────────────────────────────────────────────────┐
│ Status │ Name       │ Trigger │ Resource                                               │
├────────┼────────────┼─────────┼────────────────────────────────────────────────────────┤
│ READY  │ helloWorld │ HTTP    │ http://localhost:5000/uczsieapp/us-central1/helloWorld │
└────────┴────────────┴─────────┴────────────────────────────────────────────────────────┘

Но если я перехожу на этот URL, я получаю

enter image description here

То же самое происходит, если я пытаюсь запустить его из каталога functions

Вот мой код helloWorld:

export const helloWorld = functions.https.onRequest((req, resp) => {
    return 'hello';
});

Что такоеЯ пропал?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...