Меня интересует это решение Google Cloud Platform, но я столкнулся с проблемой. https://cloud.google.com/solutions/processing-user-generated-content-using-video-intelligence
Я попытался создать проблему в этом репозитории Github, но вкладки проблемы не было. Итак, я публикую здесь свою проблему. https://github.com/GoogleCloudPlatform/cloud-functions-intelligentcontent-nodejs
Я все делал в облачной оболочке GCP.
Я следовал руководству https://cloud.google.com/solutions/processing-user-generated-content-using-video-intelligence, и все было идеально, пока я не развернул Функция GCStoPubsub.
Развернуть функцию GCStoPubsub
https://cloud.google.com/solutions/processing-user-generated-content-using-video-intelligence#deploy_the_gcstopubsub_function
Сначала я попробовал это.
gcloud functions deploy GCStoPubsub --stage-bucket gs://staging-kazu --trigger-topic upload_notification --entry-point GCStoPubsub
Затем я получил это сообщение об ошибке.
ERROR: (gcloud.functions.deploy) Missing required argument [runtime]: Flag `--runtime` is requir
ed for new functions.
Итак, я добавил --runtime nodejs10
и попробовал снова.
gcloud functions deploy GCStoPubsub --stage-bucket gs://staging-kazu --trigger-topic upload_notification --entry-point GCStoPubsub --runtime nodejs10
Затем я получил это более крупное сообщение об ошибке .
Deploying function (may take a while - up to 2 minutes)...failed.
ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: ...ence/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 5.3.0-1030-gcp
node-pre-gyp ERR! command "/usr/bin/node" "/workspace/node_modules/@google-cloud/video-intelligence/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=s
tatic_library"
node-pre-gyp ERR! cwd /workspace/node_modules/@google-cloud/video-intelligence/node_modules/grpc
node-pre-gyp ERR! node -v v10.20.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
In file included from ../deps/grpc/src/core/lib/channel/channel_stack.c:19:0:
../deps/grpc/src/core/lib/channel/channel_stack.h:38:10: fatal error: grpc/grpc.h: No such file or directory
#include <grpc/grpc.h>
^~~~~~~~~~~~~
compilation terminated.
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:191:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.3.0-1030-gcp
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/workspace/node_modules/@goo
gle-cloud/video-intelligence/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/workspace/node_modules/@google-cloud/v
ideo-intelligence/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc"
gyp ERR! cwd /workspace/node_modules/@google-cloud/video-intelligence/node_modules/grpc
gyp ERR! node -v v10.20.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN The package ava is included as both a dev and production dependency.
npm WARN The package sinon is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.7.3 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.7.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /builder/home/.npm/_logs/2020-08-03T08_15_41_930Z-debug.log; Error ID: 49341d49
Не могли бы вы дать мне какой-нибудь совет, пожалуйста?