У меня самые тяжелые времена, когда я просто пытаюсь пройти руководство по облачным функциям здесь . Каждый раз, когда я пытаюсь сделать firebase deploy --only functions
, всегда получаю ошибку. Мой файл firebase-debug.log выглядит так:
[debug] [2020-05-05T23:45:15.510Z] ----------------------------------------------------------------------
[debug] [2020-05-05T23:45:15.514Z] Command: /usr/local/bin/node /usr/local/bin/firebase deploy --only functions
[debug] [2020-05-05T23:45:15.515Z] CLI Version: 6.3.0
[debug] [2020-05-05T23:45:15.515Z] Platform: darwin
[debug] [2020-05-05T23:45:15.515Z] Node Version: v8.17.0
[debug] [2020-05-05T23:45:15.515Z] Time: Tue May 05 2020 19:45:15 GMT-0400 (EDT)
[debug] [2020-05-05T23:45:15.515Z] ----------------------------------------------------------------------
[debug]
[debug] [2020-05-05T23:45:15.532Z] > 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-05T23:45:15.533Z] > authorizing via signed-in user
[debug] [2020-05-05T23:45:15.533Z] [iam] checking project cloud-functions-demo-5b1c8 for permissions ["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"]
[debug] [2020-05-05T23:45:15.535Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[debug] [2020-05-05T23:45:15.535Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token
<request body omitted>
[debug] [2020-05-05T23:45:15.672Z] <<< HTTP RESPONSE 200
[debug] [2020-05-05T23:45:15.684Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/cloud-functions-demo-5b1c8:testIamPermissions
[debug] [2020-05-05T23:45:15.818Z] <<< HTTP RESPONSE 200
[debug] [2020-05-05T23:45:17.852Z] TypeError: Cannot read property 'wanted' of undefined
at /usr/local/lib/node_modules/firebase-tools/lib/checkFirebaseSDKVersion.js:37:51
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:229:7)
[error]
[error] Error: An unexpected error has occurred.
[debug] [2020-05-05T23:45:48.671Z] ----------------------------------------------------------------------
[debug] [2020-05-05T23:45:48.674Z] Command: /usr/local/bin/node /usr/local/bin/firebase deploy --only functions
[debug] [2020-05-05T23:45:48.675Z] CLI Version: 6.3.0
[debug] [2020-05-05T23:45:48.675Z] Platform: darwin
[debug] [2020-05-05T23:45:48.675Z] Node Version: v8.17.0
[debug] [2020-05-05T23:45:48.675Z] Time: Tue May 05 2020 19:45:48 GMT-0400 (EDT)
[debug] [2020-05-05T23:45:48.676Z] ----------------------------------------------------------------------
[debug]
[debug] [2020-05-05T23:45:48.690Z] > 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-05T23:45:48.690Z] > authorizing via signed-in user
[debug] [2020-05-05T23:45:48.690Z] [iam] checking project cloud-functions-demo-5b1c8 for permissions ["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"]
[debug] [2020-05-05T23:45:48.693Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/cloud-functions-demo-5b1c8:testIamPermissions
[debug] [2020-05-05T23:45:48.887Z] <<< HTTP RESPONSE 200
[debug] [2020-05-05T23:45:50.700Z] TypeError: Cannot read property 'wanted' of undefined
at /usr/local/lib/node_modules/firebase-tools/lib/checkFirebaseSDKVersion.js:37:51
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:229:7)
[error]
[error] Error: An unexpected error has occurred.
Я был бы признателен за любую помощь в этой области! Я уже пробовал удалить каталог функций и просто запустил firebase deploy
, но безуспешно. Я также пробовал понизить node.js и npm до 6.9.2 (используя n
), но это тоже не помогло. Любая помощь будет принята с благодарностью!