Firebase-tools: #์˜ ์†์„ฑ ๊ตฌ์„ฑ์„ ์„ค์ •ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.<object>๊ฒŒํ„ฐ ๋งŒ์žˆ๋Š”</object>

์— ๋งŒ๋“  2020๋…„ 05์›” 28์ผ  ยท  35์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: firebase/firebase-tools

[ํ•„์ˆ˜] ํ™˜๊ฒฝ ์ •๋ณด

firebase-tools : 8.4.0

ํ”Œ๋žซํผ : 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 8.4.1 ๋ฒ„์ „์—์„œ ๋ฐฉ๊ธˆ ๋ฆด๋ฆฌ์Šค๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๋ชจ๋“  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-functions ๋ฆด๋ฆฌ์Šค์™€ ๊ด€๋ จ์ด ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.
https://github.com/firebase/firebase-functions/releases/tag/v3.6.2

๋‚˜๋Š” ์•„์ฃผ ์ตœ๊ทผ์˜ ๊ฒƒ์ด์–ด์•ผํ•œ๋‹ค. ๋‹ค๋ฅธ ๋ฌธ์ œ๋ฅผ ์‚ดํŽด๋ณด๋ฉด v8.xx ์—๋ฎฌ๋ ˆ์ดํ„ฐ๊ฐ€ ์–ด๋Š ์‹œ์ ์—์„œ ์ž‘๋™ํ•˜๊ณ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค (๊ทธ๋ฆฌ๊ณ  v8.4.0์€ ์ผ์ฃผ์ผ ์ „์— ์ถœ์‹œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค).

์•ˆ๋…•ํ•˜์„ธ์š”,
๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค :)

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค @ uditha-atukorala ๊ทธ๊ฒƒ์€ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค :)

[email protected] ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•˜๋ฉด
HTTP ์š”์ฒญ์ด ๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

์ˆ˜์ •์€ # 2302์— ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค ... ์Šน์ธ ๋ฐ ๋ณ‘ํ•ฉ๋˜๋ฉด ์ตœ๋Œ€ํ•œ ๋นจ๋ฆฌ ๋ฆด๋ฆฌ์Šคํ•˜๋ ค๊ณ ํ•ฉ๋‹ˆ๋‹ค.

๋˜‘๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. ๋งฅ OS

์ด๊ฒƒ์€ ์ง€๋‚œ ๋ช‡ ์‹œ๊ฐ„ ๋™์•ˆ ์ €๋ฅผ ๋‹นํ™ฉํ•˜๊ฒŒํ–ˆ์Šต๋‹ˆ๋‹ค. @ boddy33 ๊ณผ ๋™์ผํ•œ index.js ์žˆ์œผ๋ฉฐ 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 8.4.1 ๋ฒ„์ „์—์„œ ๋ฐฉ๊ธˆ ๋ฆด๋ฆฌ์Šค๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค ... ์ œ ์‹œ๊ฐ„์—

ํ™•์ธ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

์•ˆ๋…•ํ•˜์„ธ์š”
์•ฝ 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 8.4.1 ๋ฒ„์ „์—์„œ ๋ฐฉ๊ธˆ ๋ฆด๋ฆฌ์Šค๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์ตœ์‹  ๋ฒ„์ „์ด์žˆ๋Š” ๊ฒฝ์šฐ ๋‚ด ํ•จ์ˆ˜๊ฐ€ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๋ฐฐํฌ๋˜์–ด์•ผํ•ฉ๋‹ˆ๊นŒ?

@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-admin": "8.12.1",
"firebase-functions": "3.6.1",

๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐ ํ•˜์…จ๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค @iamsrujal

์—ฌ์ „ํžˆ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๊นŒ?

์ฒด๊ณ„
Mac OS Catalina : 10.15.4
๋…ธ๋“œ : v10.21.0
์ž๋ฐ” : openjdk ๋ฒ„์ „ "14.0.1"2020-04-14

ํŒจํ‚ค์ง€ ๋ฒ„์ „ :
"firebase-admin": "^ 8.12.1",
"firebase-functions": "^ 3.7.0",
[email protected]

๋‚ด๊ฐ€ ์‹คํ–‰ ํ•œ ๋ช…๋ น :
firebase ์—๋ฎฌ๋ ˆ์ดํ„ฐ : start --only ํ•จ์ˆ˜

์ฝ˜์†” ์ถœ๋ ฅ :
i ์—๋ฎฌ๋ ˆ์ดํ„ฐ ์‹œ์ž‘ : [ "ํ•จ์ˆ˜"]
โœ” ๊ธฐ๋Šฅ : ํ˜ธ์ŠคํŠธ์—์„œ node @ 10 ์‚ฌ์šฉ.
โœ” ๊ธฐ๋Šฅ : http : // localhost : 5001์—์„œ ์‹œ์ž‘๋œ ์—๋ฎฌ๋ ˆ์ดํ„ฐ
i ํ•จ์ˆ˜ : Cloud Functions์— ๋Œ€ํ•œ "/ Users / chamika / Projects / Bitsmedia / Muslim-Pro-Firebase / functions"๋ณด๊ธฐ ...
โš  ์œ ํ˜• ์˜ค๋ฅ˜ : #์˜ ์†์„ฑ ๊ตฌ์„ฑ์„ ์„ค์ •ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.๊ฒŒํ„ฐ ๋งŒ์žˆ๋Š”
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 (internal / modules / 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
์ž๋ฐ” : openjdk ๋ฒ„์ „ "14.0.1"2020-04-14

2020 ๋…„ 9 ์›” 7 ์ผ๋ถ€๋กœ ์—…๋ฐ์ดํŠธํ•˜๋ฉด "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.

ํ•ด๊ฒฐ๋˜์ง€ ์•Š๋Š” ๋‹ค์–‘ํ•œ ์ข…์†์„ฑ์˜ ๋‹ค๋ฅธ ๋ฒ„์ „์œผ๋กœ ๋†€์•˜์Šต๋‹ˆ๋‹ค.

์•„๋งˆ๋„ ์ด๊ฒƒ์€ ๋ˆ„๊ตฐ๊ฐ€์—๊ฒŒ ๋„์›€์ด ๋  ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋‚ด ๋ฆฌ๋ˆ…์Šค๋Š” ์ฝ˜์†”์— "firebase"๋ฅผ ์ž…๋ ฅ ํ•  ๋•Œ๋งˆ๋‹ค "/usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js"๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์—ˆ์œผ๋ฏ€๋กœ 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_์ด๋ผ๋Š” ๋‹จ์–ด๊ฐ€ ํ•ต์‹ฌ์ž…๋‹ˆ๋‹ค.

์ „์—ญ ์„ค์น˜๋Š” '/ usr / local / lib / node_modules'์— firebase-tools๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ 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 ๋ฒ„์ „์„ ์‚ญ์ œํ•˜๋ฉด firebase -V ์—์„œ 7.0.0 ๋ฐ˜ํ™˜ ๋ฌธ์ œ๊ฐ€ ํ•ด๊ฒฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๋‚˜๋Š” ๋™์•ˆ ์‚ฌ์šฉ ๋œ ๋‹ค๋ฅธ ๋…ธ๋“œ ๋ฒ„์ „์œผ๋กœ ์ธํ•ด ์œ„์˜ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.

  1. ํ”„๋กœ์ ํŠธ ์ดˆ๊ธฐํ™” (firebase init) => ๋…ธ๋“œ ๋ฒ„์ „ => v8.xx
  2. ์‹คํ–‰์ค‘์ธ ํ”„๋กœ์ ํŠธ (firebase emulators : start) => ๋…ธ๋“œ ๋ฒ„์ „ => v12.xx

๋™์ผํ•œ ๋…ธ๋“œ ๋ฒ„์ „์„ ๋งŒ๋“ค์–ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.

์•„๋งˆ๋„ ์ด๊ฒƒ์€ ๋ˆ„๊ตฐ๊ฐ€์—๊ฒŒ ๋„์›€์ด ๋  ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋‚ด ๋ฆฌ๋ˆ…์Šค๋Š” ์ฝ˜์†”์— "firebase"๋ฅผ ์ž…๋ ฅ ํ•  ๋•Œ๋งˆ๋‹ค "/usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js"๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์—ˆ์œผ๋ฏ€๋กœ 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๋ฅผ ์‹คํ–‰ ์ทจ์†Œํ•˜๋Š” ๋ฐฉ๋ฒ•

์•„๋งˆ๋„ ์ด๊ฒƒ์€ ๋ˆ„๊ตฐ๊ฐ€์—๊ฒŒ ๋„์›€์ด ๋  ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋‚ด ๋ฆฌ๋ˆ…์Šค๋Š” ์ฝ˜์†”์— "firebase"๋ฅผ ์ž…๋ ฅ ํ•  ๋•Œ๋งˆ๋‹ค "/usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js"๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์—ˆ์œผ๋ฏ€๋กœ 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 ๋“ฑ๊ธ‰