Консоль действий / Редактор облачных функций: сбой в развертывании / не удается найти модуль "@assistant/ talk"

Я разрабатываю выполнение своих действий Google с помощью веб-перехватчика на консоли действий.

Когда я пытаюсь развернуть выполнение, я получаю сообщение "Не удалось развернуть облачную функцию. Не удалось развернуть функцию. Исправьте все ошибки и повторите попытку". Проверяя журналы Firebase, я получаю следующее (NB: "[...]" были намеренно заменены в этом тексте):

cf-[xxxxxxxxxxxxxxxxxx]-name 
{"@type":"type.googleapis.com/google.cloud.audit.AuditLog","authenticationInfo":{"principalEmail":"[MY-EMAIL]@gmail.com"},"requestMetadata":{"callerIp":"[MY-IP]","callerSuppliedUserAgent":"stubby_client","requestAttributes":{"time":"2020-08-10T11:24:54.543Z","auth":{}},"destinationAttributes":{}},"serviceName":"cloudfunctions.googleapis.com","methodName":"google.cloud.functions.v1.CloudFunctionsService.CreateFunction","authorizationInfo":[{"resource":"projects/[MY-PROJECT-NAME]/locations/us-central1/functions/cf-[xxxxxxxxxxxxxxxxxx]-name","permission":"cloudfunctions.functions.create","granted":true,"resourceAttributes":{}}],"resourceName":"projects/[MY-PROJECT-NAME]/locations/us-central1/functions/cf-[xxxxxxxxxxxxxxxxxx]-name","request":{"location":"projects/[MY-PROJECT-NAME]/locations/us-central1","function":{"sourceArchiveUrl":"gs://rmq8j4hzmy/8221055331594678860/webhooks!ActionsOnGoogleFulfillment/mDO5y4t1a6I_FN-ngYmuhA","description":"This cloud function is managed by Actions on Google. Updating it manually might have unintended side effects.","name":"projects/[MY-PROJECT-NAME]/locations/us-central1/functions/cf-[xxxxxxxxxxxxxxxxxx]-name","runtime":"nodejs10","entryPoint":"ActionsOnGoogleFulfillment","httpsTrigger":{"url":"https://us-central1-[MY-PROJECT-NAME].cloudfunctions.net/cf-[xxxxxxxxxxxxxxxxxx]-name"}},"@type":"type.googleapis.com/google.cloud.functions.v1.CreateFunctionRequest"},"resourceLocation":{"currentLocations":["us-central1"]}} 

1:25:35.544 PM
cf-[xxxxxxxxxxxxxxxxxx]-name 
Provided module can't be loaded. 

1:25:35.544 PM
cf-[xxxxxxxxxxxxxxxxxx]-name
Did you list all required modules in the package.json dependencies?

1:25:35.544 PM
cf-[xxxxxxxxxxxxxxxxxx]-name
Detailed stack trace: Error: Cannot find module '@assistant/conversation' 

1:25:35.544 PM
cf-[xxxxxxxxxxxxxxxxxx]-name
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) 

1:25:35.544 PM
cf-[xxxxxxxxxxxxxxxxxx]-name
at Function.Module._load (internal/modules/cjs/loader.js:562:25) 

1:25:35.544 PM
cf-[xxxxxxxxxxxxxxxxxx]-name
at Module.require (internal/modules/cjs/loader.js:692:17)
    
1:25:35.544 PM
cf-[xxxxxxxxxxxxxxxxxx]-name
at require (internal/modules/cjs/helpers.js:25:18)
    
1:25:35.544 PM
cf-[xxxxxxxxxxxxxxxxxx]-name 
at Object.<anonymous> (/workspace/index.js:1:26)

1:25:35.544 PM
cf-[xxxxxxxxxxxxxxxxxx]-name 
at Module._compile (internal/modules/cjs/loader.js:778:30)
    
1:25:35.544 PM
cf-[xxxxxxxxxxxxxxxxxx]-name 
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) 

1:25:35.544 PM
cf-[xxxxxxxxxxxxxxxxxx]-name 
at Module.load (internal/modules/cjs/loader.js:653:32) 

1:25:35.544 PM
cf-[xxxxxxxxxxxxxxxxxx]-name 
at tryModuleLoad (internal/modules/cjs/loader.js:593:12) 

1:25:35.544 PM
cf-[xxxxxxxxxxxxxxxxxx]-name 
at Function.Module._load (internal/modules/cjs/loader.js:585:3) 

1:25:35.547 PM
cf-[xxxxxxxxxxxxxxxxxx]-name 
Could not load the function, shutting down. 
    
1:25:36.594 PM
cf-[xxxxxxxxxxxxxxxxxx]-name 
Error: function terminated. Recommended action: inspect logs for termination reason. Function cannot be initialized.
 
1:25:36.707 PM
cf-[xxxxxxxxxxxxxxxxxx]-name {"@type":"type.googleapis.com/google.cloud.audit.AuditLog","status":{"code":3,"message":"Function failed on loading 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"},"authenticationInfo":{"principalEmail":"[MY-EMAIL]@gmail.com"},"serviceName":"cloudfunctions.googleapis.com","methodName":"google.cloud.functions.v1.CloudFunctionsService.CreateFunction","resourceName":"projects/[MY-PROJECT-NAME]/locations/us-central1/functions/cf-[xxxxxxxxxxxxxxxxxx]-name"} 

Вот PACKACGE.JSON

{
  "name": "[NAME]",
  "version": "0.0.0",
  "description": "An Action that demonstrates the various available types of conversation components.",
  "main": "index.js",
  "engines": {
    "node": ">=10.18.0",
    "npm": ">=6.0.0"
  },
  "dependencies": {
    "@assistant/conversation": "^3.0.1",
    "firebase-admin": "~8.0.0",
    "firebase-functions": "^3.1.0"
  }
}

Теперь, как мне установить модуль "@ Assistant/ talk"? Я думал, раз уж он в облаке, он уже будет установлен? NB Я абсолютно не разбираюсь в облачных вычислениях.

0 ответов

Другие вопросы по тегам