node.js - gcloud 应用程序部署要求 'storage' 属性

标签 node.js google-cloud-platform gcloud

我正在尝试部署 Node.js 应用程序,仅在 app.yaml 文件中指定绝对最小值:

runtime: nodejs8

gcloud 给了我这个:

MaxRetrialsException: last_result=(None, (<type 'exceptions.AttributeError'>, AttributeError("'_Sections' object has no attribute 'storage'",), <traceback object at 0x106eca488>)), last_retrial=3, time_passed_ms=67,time_to_wait=0

我发现没有相关引用文献提到storage属性,并且MaxRetrials听起来像是网络问题,所以不知道从这里去哪里。

gcloud 版本(未安装其他组件):

Google Cloud SDK 217.0.0
bq 2.0.34
core 2018.09.17
gsutil 4.34

这是我的package.json:

{
  "name": "parrot-skill",
  "description": "Parrot skill",
  "version": "0.0.1",
  "private": true,
  "license": "MIT",
  "author": "Pirim",
  "engines": {
    "node": ">=6.9.1"
  },
  "scripts": {
    "start": "node app.js"
  },
  "dependencies": {
    "express": "^4.16.3"
  }
}

最佳答案

您是否创建了 Google 存储桶以便能够上传与部署关联的文件?

https://cloud.google.com/storage/docs/creating-buckets

拥有存储桶后,您可以在使用标志 --bucket 运行 gcloud deploy 时指定它。如果未指定此参数,则使用应用程序的默认代码存储桶。

引用:

https://cloud.google.com/sdk/gcloud/reference/app/deploy

关于node.js - gcloud 应用程序部署要求 'storage' 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52464459/

相关文章:

node.js - Node js : I to get the output of an (child) exec and set a variable to be retuned?

mysql - Docker、MySQL - 在 .sh 文件中找不到命令

javascript - 在手动页面上启动 Puppeteer

google-cloud-platform - 无法分配 iam.serviceAccounts.signBlob 权限

google-app-engine - gcloud deploy 不上传新文件

node.js - 在Azure webapp服务器中获取Google Plus用户access_token

google-cloud-platform - 在 Vertex AI Pipeline 中指定机器类型

r - 在 Google Cloud App Engine 上部署 Shiny 的应用程序会返回错误

gcloud 容器虚拟机日志记录策略

google-app-engine - GCloud 部署到 App Engine 响应错误请求