Firebase-tools: Невозможно установить конфигурацию свойства #<object>у которого есть только геттер</object>

Созданный на 28 мая 2020  ·  35Комментарии  ·  Источник: firebase/firebase-tools

[ОБЯЗАТЕЛЬНО] Информация о среде

инструменты firebase

Платформа: Windows

[ОБЯЗАТЕЛЬНО] Тестовый пример

index.js

const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();

exports.testFunction = functions.https.onRequest(async (req, res) => {

  console.log(req.body);

});

[ОБЯЗАТЕЛЬНО] Шаги по воспроизведению

начальная эмуляция работала нормально
начальное и последующие развертывания работают нормально
функция отлично работает в продакшене
не может больше эмулировать локально.

Вывод в консоль:

i  emulators: Starting emulators: functions
+  functions: Using node<strong i="23">@10</strong> from host.
i  functions: Watching "D:\path\to\functions" for Cloud Functions...
!  functions: Cannot set property config of #<Object> which has only a getter
!  Your function was killed because it raised an unhandled error.

Помимо этой проблемы, из выходных данных не ясно, что произошло. В журналах отладки ничего нет.

[ОБЯЗАТЕЛЬНО] Ожидаемое поведение


Эмулятор запускается

[ОБЯЗАТЕЛЬНО] Фактическое поведение


Эмулятор не запускается

emulator-suite functions bug

Самый полезный комментарий

Исправление было только что выпущено в версии 8.4.1 из firebase-tools

Все 35 Комментарий

@ boddy33 да ладно, это очень странно. Нет ничего другого firebase-debug.log ? Или если вы запустите команду с --debug ?

Похоже, это ошибка во время выполнения эмулятора.

[debug] [2020-05-28T19:48:29.510Z] ----------------------------------------------------------------------
[debug] [2020-05-28T19:48:29.511Z] Command:       /path/to/node-v12.16.3-darwin-x64/bin/node /path/to/node/bin/firebase functions:shell
[debug] [2020-05-28T19:48:29.511Z] CLI Version:   8.4.0
[debug] [2020-05-28T19:48:29.512Z] Platform:      darwin
[debug] [2020-05-28T19:48:29.512Z] Node Version:  v12.16.3
[debug] [2020-05-28T19:48:29.512Z] Time:          Thu May 28 2020 20:48:29 GMT+0100 (British Summer Time)
[debug] [2020-05-28T19:48:29.512Z] ----------------------------------------------------------------------
[debug] [2020-05-28T19:48:29.512Z] 
[debug] [2020-05-28T19:48:29.518Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2020-05-28T19:48:29.519Z] > authorizing via signed-in user
[debug] [2020-05-28T19:48:29.519Z] [iam] checking project firebase-project for permissions ["firebase.projects.get"]
[debug] [2020-05-28T19:48:29.521Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/firebase-project:testIamPermissions  
 {"permissions":["firebase.projects.get"]}
[debug] [2020-05-28T19:48:30.208Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Thu, 28 May 2020 19:48:30 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","server-timing":"gfet4t7; dur=563","alt-svc":"h3-27=\":443\"; ma=2592000,h3-25=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q049=\":443\"; ma=2592000,h3-Q048=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[warn] ⚠  Your requested "node" version "10" doesn't match your global version "12" {"metadata":{"emulator":{"name":"functions"},"message":"Your requested \"node\" version \"10\" doesn't match your global version \"12\""}}
[debug] [2020-05-28T19:48:30.226Z] [functions] Watching "/path/to/app" for Cloud Functions...
[debug] [2020-05-28T19:48:30.233Z] DEBUG: [worker-pool] addWorker(~diagnostic~)
[debug] [2020-05-28T19:48:30.234Z] DEBUG: [worker-pool] Adding worker with key ~diagnostic~, total=1
[debug] [2020-05-28T19:48:30.234Z] DEBUG: [worker-pool] submitWork(triggerId=)
[debug] [2020-05-28T19:48:30.234Z] DEBUG: [worker-~diagnostic~-2336cd45-d0fd-4176-8826-39b0820a42c8]: Assigning socketPath: /var/folders/5v/7080hjcx6vb_d52z1clvxqd80000gn/T/fire_emu_24604.sock
[debug] [2020-05-28T19:48:30.234Z] DEBUG: [worker-~diagnostic~-2336cd45-d0fd-4176-8826-39b0820a42c8]: BUSY
[debug] [2020-05-28T19:48:30.430Z] DEBUG: [runtime-status] [24604] Functions runtime initialized. {"cwd":"/path/to/app","node_version":"12.16.3"}
[debug] [2020-05-28T19:48:30.431Z] DEBUG: [runtime-status] [24604] Disabled runtime features: undefined
[debug] [2020-05-28T19:48:30.434Z] DEBUG: [runtime-status] [24604] Resolved module firebase-admin {"declared":true,"installed":true,"version":"8.12.1","resolution":"/path/to/app/node_modules/firebase-admin/lib/index.js"}
[debug] [2020-05-28T19:48:30.440Z] DEBUG: [runtime-status] [24604] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.6.2","resolution":"/path/to/app/node_modules/firebase-functions/lib/index.js"}
[debug] [2020-05-28T19:48:30.441Z] DEBUG: [runtime-status] [24604] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}]
[debug] [2020-05-28T19:48:30.499Z] DEBUG: [runtime-status] [24604] Checked functions.config() {"config":{}}
[debug] [2020-05-28T19:48:30.499Z] DEBUG: [runtime-status] [24604] Error in handleMessage: {"frb":{"cwd":"/path/to/app","projectId":"firebase-project","triggerId":"","emulators":{},"socketPath":"/var/folders/5v/7080hjcx6vb_d52z1clvxqd80000gn/T/fire_emu_24604.sock"},"opts":{"nodeBinary":"/path/to/node-v12.16.3-darwin-x64/bin/node"}} => TypeError: Cannot set property config of #<Object> which has only a getter: TypeError: Cannot set property config of #<Object> which has only a getter
    at /path/to/node-v12.16.3-darwin-x64/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:455:19
    at Generator.next (<anonymous>)
    at fulfilled (/path/to/node-v12.16.3-darwin-x64/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
[warn] ⚠  functions: Cannot set property config of #<Object> which has only a getter {"metadata":{"emulator":{"name":"functions"},"message":"Cannot set property config of #<Object> which has only a getter"}}
[warn] ⚠  Your function was killed because it raised an unhandled error. {"metadata":{"emulator":{"name":"functions"},"message":"Your function was killed because it raised an unhandled error."}}
[debug] [2020-05-28T19:48:30.504Z] DEBUG: [worker-~diagnostic~-2336cd45-d0fd-4176-8826-39b0820a42c8]: exited
[debug] [2020-05-28T19:48:30.504Z] DEBUG: [worker-~diagnostic~-2336cd45-d0fd-4176-8826-39b0820a42c8]: FINISHED

Похоже, это проблема с v8.xx. Переход на версию v7.16.2 работает.

У меня такое чувство, что это может быть связано с сегодняшним выпуском функций firebase:
https://github.com/firebase/firebase-functions/releases/tag/v3.6.2

Я должен быть чем-то совсем недавним. Если посмотреть на другие проблемы, эмулятор v8.xx в какой-то момент работал (а v8.4.0 был выпущен неделю назад).

Привет,
такая же проблема :)

спасибо @ uditha-atukorala работает :)

при установке пакета [email protected] тогда
HTTP-запросы у меня работают

Исправление появится в # 2302 ... если оно будет одобрено и объединено, мы постараемся выпустить как можно скорее

Возникла точно такая же проблема. macOS

это поставило меня в тупик последние несколько часов. У меня есть тот же index.js что и у @ boddy33, и это даже происходит, когда index.js пуст. Вот мой журнал firebase-debug.log:

[debug] [2020-05-28T19:54:42.206Z] [runtime-status] [27226] Checked functions.config() {"config":{}} 
[debug] [2020-05-28T19:54:42.206Z] [runtime-status] [27226] Error in handleMessage: {"frb":{"cwd":"/Users/aprilpolubiec/Documents/my-project/functions","projectId":"my-project","triggerId":"","emulators":{},"socketPath":"/var/folders/sh/fsnv9b8n29713r9d3kj_7w4c0000gn/T/fire_emu_27226.sock"},"opts":{"nodeBinary":"/Users/aprilpolubiec/.nvm/versions/node/v13.7.0/bin/node"}} => TypeError: Cannot set property config of #<Object> which has only a getter: TypeError: Cannot set property config of #<Object> which has only a getter
    at /Users/aprilpolubiec/.nvm/versions/node/v13.7.0/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:457:19
    at Generator.next (<anonymous>)
    at fulfilled (/Users/aprilpolubiec/.nvm/versions/node/v13.7.0/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) 
[warn] ⚠  functions: Cannot set property config of #<Object> which has only a getter
[warn] ⚠  Your function was killed because it raised an unhandled error.

мы ждем любопытных одобрения

Исправление было только что выпущено в версии 8.4.1 из firebase-tools

спасибо за это ... как раз вовремя

подтверждено. Спасибо.

Здравствуйте
Около 2 дней назад я развертывал функции, и все прошло без проблем, к сожалению, со вчерашнего дня я не могу выполнить развертывание. У меня были довольно старые пакеты:

    "firebase": "^5.9.2",
    "firebase-admin": "~8.9.0",
    "firebase-functions": "^3.3.0",
    "firebase-tools": "^4.0.0",

и я получал следующее:
image

но мог запускать функции локально (--serve).

Сегодня я обновил все зависимости до более новых версий, которые теоретически должны включать исправление, но, к сожалению, теперь я получаю новую ошибку, такую ​​же, как в этой проблеме.

    "firebase": "^7.14.5",
    "firebase-admin": "~8.10.0",
    "firebase-functions": "^3.6.2",
    "firebase-tools": "^8.4.1",
[2020-05-29T09:30:46.002Z] [runtime-status] [42525] Error in handleMessage: {"frb":{"cwd":"/Users/jakub.jodelka/xxxProject/backend","projectId":"xxxProject","triggerId":"","emulators":{},"socketPath":"/var/folders/nj/4g6vwdm90bl4tmktf8hpn__00000gp/T/fire_emu_42525.sock"},"opts":{"nodeBinary":"/usr/local/bin/firebase"}} => TypeError: Cannot set property config of #<Object> which has only a getter: TypeError: Cannot set property config of #<Object> which has only a getter
    at /Users/jakub.jodelka/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:455:19
    at Generator.next (<anonymous>)
    at fulfilled (/Users/jakub.jodelka/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) 
⚠  functions: Cannot set property config of #<Object> which has only a getter
⚠  Your function was killed because it raised an unhandled error.

Я не могу развертывать функции, но даже не могу запускать их локально из-за той же проблемы.

Исправление было только что выпущено в версии 8.4.1 из firebase-tools

Должны ли мои функции правильно развертываться, если у меня последние версии?

@samtstern ^
Не уверен, нужно ли закрывать эту проблему.

@jakubjodelka, можете попробовать очистить папку node_modules и снова запустить npm install ? Если после этого это будет продолжаться, и firebase --version показывает 8.4.1 дайте мне знать.

Благодарю. Сейчас работаю на меня.

[2020-05-29T14:38:16.042Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2020-05-29T14:38:16.043Z] > authorizing via signed-in user
[2020-05-29T14:38:16.044Z] [iam] checking project bryn-todoapp-27e80 for permissions ["firebase.projects.get"]
[2020-05-29T14:38:16.047Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/bryn-todoapp-27e80:testIamPermissions
 {"permissions":["firebase.projects.get"]}
[2020-05-29T14:38:16.314Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Fri, 29 May 2020 14:38:16 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","server-timing":"gfet4t7; dur=117","alt-svc":"h3-27=\":443\"; ma=2592000,h3-25=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q049=\":443\"; ma=2592000,h3-Q048=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-05-29T14:38:16.316Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/bryn-todoapp-27e80  

[2020-05-29T14:38:16.590Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Fri, 29 May 2020 14:38:16 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-27=\":443\"; ma=2592000,h3-25=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q049=\":443\"; ma=2592000,h3-Q048=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}

=== Serving from 'C:\Users\Bryn\Desktop\bryn-todoapp'...

+  functions: Using node<strong i="5">@10</strong> from host. {"metadata":{"emulator":{"name":"functions"},"message":"Using node<strong i="6">@10</strong> from host."}}
i  functions: Watching "C:\Users\Bryn\Desktop\bryn-todoapp\functions" for Cloud Functions... {"metadata":{"emulator":{"name":"functions"},"message":"Watching \"C:\\Users\\Bryn\\Desktop\\bryn-todoapp\\functions\" for Cloud Functions..."}}
[2020-05-29T14:38:18.632Z] [worker-pool] addWorker(~diagnostic~) {"metadata":{"emulator":{"name":"functions"},"message":"[worker-pool] addWorker(~diagnostic~)"}}
[2020-05-29T14:38:18.638Z] [worker-pool] Adding worker with key ~diagnostic~, total=1 {"metadata":{"emulator":{"name":"functions"},"message":"[worker-pool] Adding worker with key ~diagnostic~, total=1"}}     
[2020-05-29T14:38:18.638Z] [worker-pool] submitWork(triggerId=) {"metadata":{"emulator":{"name":"functions"},"message":"[worker-pool] submitWork(triggerId=)"}}
[2020-05-29T14:38:18.639Z] [worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: Assigning socketPath: \\?\pipe\C:\Users\Bryn\Desktop\bryn-todoapp\functions\14372 {"metadata":{"emulator":{"name":"functions"},"message":"[worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: Assigning socketPath: \\\\?\\pipe\\C:\\Users\\Bryn\\Desktop\\bryn-todoapp\\functions\\14372"}}
[2020-05-29T14:38:18.640Z] [worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: BUSY {"metadata":{"emulator":{"name":"functions"},"message":"[worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: 
BUSY"}}
[2020-05-29T14:38:18.955Z] [runtime-status] [14372] Functions runtime initialized. {"cwd":"C:\\Users\\Bryn\\Desktop\\bryn-todoapp\\functions","node_version":"10.10.0"} {"metadata":{"emulator":{"name":"functions"},"message":"[runtime-status] [14372] Functions runtime initialized. {\"cwd\":\"C:\\\\Users\\\\Bryn\\\\Desktop\\\\bryn-todoapp\\\\functions\",\"node_version\":\"10.10.0\"}"}}
[2020-05-29T14:38:18.957Z] [runtime-status] [14372] Disabled runtime features: undefined {"metadata":{"emulator":{"name":"functions"},"message":"[runtime-status] [14372] Disabled runtime features: undefined"}}
[2020-05-29T14:38:18.960Z] [runtime-status] [14372] Resolved module firebase-admin {"declared":true,"installed":true,"version":"8.12.1","resolution":"C:\\Users\\Bryn\\Desktop\\bryn-todoapp\\functions\\node_modules\\firebase-admin\\lib\\index.js"} {"metadata":{"emulator":{"name":"functions"},"message":"[runtime-status] [14372] Resolved module firebase-admin {\"declared\":true,\"installed\":true,\"version\":\"8.12.1\",\"resolution\":\"C:\\\\Users\\\\Bryn\\\\Desktop\\\\bryn-todoapp\\\\functions\\\\node_modules\\\\firebase-admin\\\\lib\\\\index.js\"}"}}
[2020-05-29T14:38:18.961Z] [runtime-status] [14372] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.6.2","resolution":"C:\\Users\\Bryn\\Desktop\\bryn-todoapp\\functions\\node_modules\\firebase-functions\\lib\\index.js"} {"metadata":{"emulator":{"name":"functions"},"message":"[runtime-status] [14372] Resolved module firebase-functions {\"declared\":true,\"installed\":true,\"version\":\"3.6.2\",\"resolution\":\"C:\\\\Users\\\\Bryn\\\\Desktop\\\\bryn-todoapp\\\\functions\\\\node_modules\\\\firebase-functions\\\\lib\\\\index.js\"}"}}
!  functions: Your GOOGLE_APPLICATION_CREDENTIALS environment variable points to /home/user/Downloads/[bryn-todoapp-27e80-firebase-adminsdk-gp1c1-8bc2ce2561].json. Non-emulated services will access production using these credentials. Be careful! {"metadata":{"emulator":{"name":"functions"},"message":"Your GOOGLE_APPLICATION_CREDENTIALS environment variable points to /home/user/Downloads/[bryn-todoapp-27e80-firebase-adminsdk-gp1c1-8bc2ce2561].json. Non-emulated services will access production using these credentials. Be careful!"}}
[2020-05-29T14:38:18.974Z] [runtime-status] [14372] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] {"metadata":{"emulator":{"name":"functions"},"message":"[runtime-status] [14372] Outgoing network have been stubbed. [{\"name\":\"http\",\"status\":\"mocked\"},{\"name\":\"http\",\"status\":\"mocked\"},{\"name\":\"https\",\"status\":\"mocked\"},{\"name\":\"https\",\"status\":\"mocked\"},{\"name\":\"net\",\"status\":\"mocked\"}]"}}
[2020-05-29T14:38:19.003Z] [runtime-status] [14372] Checked functions.config() {"config":{}} {"metadata":{"emulator":{"name":"functions"},"message":"[runtime-status] [14372] Checked functions.config() {\"config\":{}}"}}
[2020-05-29T14:38:19.009Z] [runtime-status] [14372] Error in handleMessage: {"frb":{"cwd":"C:\\Users\\Bryn\\Desktop\\bryn-todoapp\\functions","projectId":"bryn-todoapp-27e80","triggerId":"","emulators":{},"socketPath":"\\\\?\\pipe\\C:\\Users\\Bryn\\Desktop\\bryn-todoapp\\functions\\14372"},"opts":{"nodeBinary":"C:\\Program Files\\nodejs\\node.exe"}} => TypeError: Cannot set property config of #<Object> which has 
only a getter: TypeError: Cannot set property config of #<Object> which has only a getter
    at C:\Users\Bryn\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:455:19
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\Bryn\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:5:58)
    at process._tickCallback (internal/process/next_tick.js:68:7) {"metadata":{"emulator":{"name":"functions"},"message":"[runtime-status] [14372] Error in handleMessage: {\"frb\":{\"cwd\":\"C:\\\\Users\\\\Bryn\\\\Desktop\\\\bryn-todoapp\\\\functions\",\"projectId\":\"bryn-todoapp-27e80\",\"triggerId\":\"\",\"emulators\":{},\"socketPath\":\"\\\\\\\\?\\\\pipe\\\\C:\\\\Users\\\\Bryn\\\\Desktop\\\\bryn-todoapp\\\\functions\\\\14372\"},\"opts\":{\"nodeBinary\":\"C:\\\\Program Files\\\\nodejs\\\\node.exe\"}} => TypeError: Cannot set property config of #<Object> which has only a getter: TypeError: Cannot set property config of #<Object> which has only a getter\n    at C:\\Users\\Bryn\\AppData\\Roaming\\npm\\node_modules\\firebase-tools\\lib\\emulator\\functionsEmulatorRuntime.js:455:19\n    at Generator.next (<anonymous>)\n   
 at fulfilled (C:\\Users\\Bryn\\AppData\\Roaming\\npm\\node_modules\\firebase-tools\\lib\\emulator\\functionsEmulatorRuntime.js:5:58)\n    at process._tickCallback (internal/process/next_tick.js:68:7)"}}     
!  functions: Cannot set property config of #<Object> which has only a getter {"metadata":{"emulator":{"name":"functions"},"message":"Cannot set property config of #<Object> which has only a getter"}}        
!  Your function was killed because it raised an unhandled error. {"metadata":{"emulator":{"name":"functions"},"message":"Your function was killed because it raised an unhandled error."}}
[2020-05-29T14:38:19.019Z] [worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: exited {"metadata":{"emulator":{"name":"functions"},"message":"[worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: exited"}}
[2020-05-29T14:38:19.029Z] [worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: FINISHED {"metadata":{"emulator":{"name":"functions"},"message":"[worker-~diagnostic~-8db31d96-b4d5-4fa2-9230-e536f082a401]: FINISHED"}}  `

Я все еще понимаю, я сделал все выше, есть мысли?

image

@COFFEEEADDICT проверьте, что firebase --version показывает 8.4.1

Привет, ребята,

Я получил эту ошибку после обновления пакета firebase-functions (3.6.2).

В моем случае решение заключалось в том, чтобы удалить /node_modules и понизить firebase-functions до предыдущей версии ( npm install --save [email protected] ).

Привет ребята,

Первая проверка того, какую версию вы установили, была 8.1.1.
Пожалуйста, обновите firebase-tools, позвонив

sudo npm i -g firebase-tools

Будет установлена ​​последняя версия 8.4.1.
И это устранило мою проблему.
Фактически, я установил последнюю функцию firebase и админ
"firebase-admin": "8.12.1",
"firebase-functions": "3.6.1",

Надеюсь, вы устранили проблему.

спасибо за работу @iamsrujal

Проблема все еще не решена. Помощь?

Система
Mac OS Catalina: 10.15.4
Узел: v10.21.0
Java: версия openjdk "14.0.1" 2020-04-14

Версии пакета:
"firebase-admin": "^ 8.12.1",
"firebase-functions": "^ 3.7.0",
[email protected]

Команда, которую я выполнил:
эмуляторы firebase

Консольный вывод:
i Запуск эмуляторов: ["функции"]
✔ функции: Использование узла @ 10 от хоста.
✔ функции: Эмулятор запущен с http: // localhost : 5001
i функции: просмотр "/ Users / chamika / Projects / Bitsmedia / Muslim-Pro-Firebase / functions" для облачных функций ...
⚠ TypeError: невозможно установить конфигурацию свойства #у которого есть только геттер
в InitializeFunctionsConfigHelper (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:328:15)
в /usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:448:13
в Generator.next ()
в /usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:7:71
в новом обещании ()
в __awaiter (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:3:12)
на главной (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:421:12)
на объекте.(/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:511:5)
в Module._compile (внутренний / модули / cjs / loader.js: 778: 30)
в Object.Module._extensions..js (internal / modules / cjs / loader.js: 789: 10)
⚠ Ваша функция была прервана из-за необработанной ошибки.

У меня такая же проблема, и она не исчезает даже после обновления firebase-tools. Когда я пытаюсь запустить эмулятор, он терпит неудачу. В журнале firebase-debug.log показано:

[debug] [2020-06-23T18:50:31.331Z] [runtime-status] [54019] Error in handleMessage: {"frb":{"cwd":"/Users/shaimo-mbp/dev/javascript/CryptoTracker/functions","projectId":"cryptotracker-fa488","triggerId":"","ports":{"firestore":8080},"socketPath":"/var/folders/83/c3hy2yfx53g6_f3bvwcslqcc0000gn/T/fire_emu_54019.sock"},"opts":{"nodeBinary":"/Users/shaimo-mbp/.nvm/versions/node/v10.18.1/bin/node"}} => TypeError: Cannot set property config of #<Object> which has only a getter: TypeError: Cannot set property config of #<Object> which has only a getter
    at /usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:514:19
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:5:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
[warn] ⚠  functions:
[warn] ⚠  Your function was killed because it raised an unhandled error.

Как я могу это исправить? Полностью застрял здесь ...

Для тех, кто все еще сталкивается с этой проблемой: если вы можете воспроизвести эту проблему в только что инициализированном проекте таким образом, чтобы мы могли скопировать, отправьте новую проблему, и мы попробуем ее.

Если это кому-то поможет: мне пришлось использовать явную версию для обновления инструментов, а затем проблема исчезла:
sudo npm i -g [email protected]

Система
Mac OS Catalina: 10.15.4
Узел: v10.21.0
Java: версия openjdk "14.0.1" 2020-04-14

Обновление от 07.09.2020: эта проблема сохраняется при использовании "firebase-admin": "^8.10.0", .
Мне пришлось обновиться до "firebase-admin": "^8.12.1", и дважды проверить, что у меня есть "firebase-tools": "8.4.1"

Такая же установка, как у JohnGeorgiadis. Та же проблема...

functions: Cannot set property config of #<Object> which has only a getter ⚠ Your function was killed because it raised an unhandled error.

Поигрался с разными версиями разных зависимостей, но не решил.

Может быть, это кому-нибудь поможет: мой Linux использовал "/usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js" каждый раз, когда я набирал "firebase" в консоли, поэтому он использовал версию 7.12. 0 версия пакета. Я поменял символическую ссылку и теперь уверен, что использую версию 8.6.0.

user<strong i="6">@machine</strong>: which firebase
/usr/local/bin/firebase
user<strong i="7">@machine</strong>: cd /usr/local/bin
user<strong i="8">@machine</strong>: sudo rm firebase
user<strong i="9">@machine</strong>: sudo ln -s /usr/lib/node_modules/firebase-tools/lib/bin/firebase.js firebase
user<strong i="10">@machine</strong>: firebase --version
8.6.0

Слово _local_ является ключевым

Глобальная установка установит firebase-tools в '/ usr / local / lib / node_modules'. Однако проблема, выделенная OP, указывает на другой путь: '/ usr / lib / node_modules / firebase-tools /'.
По первому пути у меня была последняя версия firebase-tools 8.6.0, а по второму - версия 7.0.2.

Firebase -V вернул 7.0.2

Вот соответствующий комментарий (из обсуждения здесь: https://stackoverflow.com/q/5926672/7461599)

installing without -g option will install a module to you working directory e.g. if you make a directory say ~/Desktop/tmp then cd ~/Desktop/tmp then do npm install appium then do ls you will see node_modules package-lock.json because you have installed a node module appium to your working directory... super confusing because -g should essentially be the default but is not.

Для меня это помогло npm uninstall firebase-tools , а затем убедиться, что у меня установлена ​​последняя версия с -g . Теперь firebase -V указывает правильный путь с последней версией, и эмулятор firebase работает без сбоев.

В случае, если это помогает, у меня был конфликт между моим глобальным npm [email protected] и моей глобальной пряжей [email protected] . Удаление моей глобальной версии npm устранило мою проблему с возвратом 7.0.0 из firebase -V

я получал указанную выше ошибку из-за другой версии узла, используемой во время

  1. инициализация проекта (firebase init) => версия узла => v8.xx
  2. проект запущен (эмуляторы firebase: запуск) => версия узла => v12.xx

Я решил проблему, сделав ту же версию узла

Может быть, это кому-нибудь поможет: мой Linux использовал "/usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js" каждый раз, когда я набирал "firebase" в консоли, поэтому он использовал версию 7.12. 0 версия пакета. Я поменял символическую ссылку и теперь уверен, что использую версию 8.6.0.

user<strong i="7">@machine</strong>: which firebase
/usr/local/bin/firebase
user<strong i="8">@machine</strong>: cd /usr/local/bin
user<strong i="9">@machine</strong>: sudo rm firebase
user<strong i="10">@machine</strong>: sudo ln -s /usr/lib/node_modules/firebase-tools/lib/bin/firebase.js firebase
user<strong i="11">@machine</strong>: firebase --version
8.6.0

Слово _local_ является ключевым

Как мне отменить sudo rm firebase

Может быть, это кому-нибудь поможет: мой Linux использовал "/usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js" каждый раз, когда я набирал "firebase" в консоли, поэтому он использовал версию 7.12. 0 версия пакета. Я поменял символическую ссылку и теперь уверен, что использую версию 8.6.0.

user<strong i="8">@machine</strong>: which firebase
/usr/local/bin/firebase
user<strong i="9">@machine</strong>: cd /usr/local/bin
user<strong i="10">@machine</strong>: sudo rm firebase
user<strong i="11">@machine</strong>: sudo ln -s /usr/lib/node_modules/firebase-tools/lib/bin/firebase.js firebase
user<strong i="12">@machine</strong>: firebase --version
8.6.0

Слово _local_ является ключевым

Как мне отменить sudo rm firebase

Вы не можете (легко). Я бы попытался найти аналогичный двоичный файл и разместить по тому же пути

Была ли эта страница полезной?
0 / 5 - 0 рейтинги