简体   繁体   English

尝试将Node.js项目部署到Google App Engine时出错

[英]Error trying to deploy Node.js project to Google app engine

I am trying to deploy my node.js project to my App Engine project. 我正在尝试将node.js项目部署到我的App Engine项目中。 the command I use is gcloud preview app deploy app.yaml . 我使用的命令是gcloud preview app deploy app.yaml

This is my app.yaml file: 这是我的app.yaml文件:

runtime: nodejs
vm: true
skip_files:
  - ^(.*/)?.*/node_modules/.*$

and this is the error I get: ERROR: (gcloud.preview.app.deploy) We were unable to detect the runtime to use for this application. Please specify the [runtime] field in your application yaml file or check that your application is configured correctly. 这是我得到的错误: ERROR: (gcloud.preview.app.deploy) We were unable to detect the runtime to use for this application. Please specify the [runtime] field in your application yaml file or check that your application is configured correctly. ERROR: (gcloud.preview.app.deploy) We were unable to detect the runtime to use for this application. Please specify the [runtime] field in your application yaml file or check that your application is configured correctly.

I'm pretty sure I have set up the project correctly, and have also gcloud init my gcloud CLI. 我很确定自己已经正确设置了项目,并且还使用gcloud init我的gcloud CLI。

Any help'd be appreciated! 任何帮助将不胜感激!

EDIT: 编辑:

$ gcloud --version
Google Cloud SDK 99.0.0

bq 2.0.18
bq-nix 2.0.18
core 2016.02.26
core-nix 2016.02.05
gcloud 
gsutil 4.17
gsutil-nix 4.15

$ gcloud components list

Your current Cloud SDK version is: 99.0.0
The latest available version is: 99.0.0

┌─────────────────────────────────────────────────────────────────────────────────┐
│                                    Components                                   │
├───────────────┬─────────────────────────────────┬───────────────────┬───────────┤
│     Status    │               Name              │         ID        │    Size   │
├───────────────┼─────────────────────────────────┼───────────────────┼───────────┤
│ Not Installed │ Cloud Datastore Emulator        │ gcd-emulator      │  38.1 MiB │
│ Not Installed │ Cloud Pub/Sub Emulator          │ pubsub-emulator   │  10.1 MiB │
│ Not Installed │ gcloud Alpha Commands           │ alpha             │   < 1 MiB │
│ Not Installed │ gcloud Beta Commands            │ beta              │   < 1 MiB │
│ Not Installed │ gcloud app Java Extensions      │ app-engine-java   │ 101.4 MiB │
│ Not Installed │ gcloud app Python Extensions    │ app-engine-python │   7.2 MiB │
│ Not Installed │ kubectl                         │ kubectl           │   5.2 MiB │
│ Installed     │ BigQuery Command Line Tool      │ bq                │   < 1 MiB │
│ Installed     │ Cloud SDK Core Libraries        │ core              │   3.9 MiB │
│ Installed     │ Cloud Storage Command Line Tool │ gsutil            │   2.6 MiB │
│ Installed     │ Default set of gcloud commands  │ gcloud            │           │
└───────────────┴─────────────────────────────────┴───────────────────┴───────────┘

Try adding --verbosity=debug to your "gcloud preview app deploy" command to see what's going on. 尝试在您的“ gcloud预览应用程序部署”命令中添加--verbosity = debug,以查看发生了什么。 Most likely, there's something else about your application that gcloud doesn't recognize, like a missing or invalid package.json. 最有可能的是,gcloud无法识别您的应用程序中的其他内容,例如缺少或无效的package.json。 This is being badly reported as an unrecognized runtime. 严重将其报告为无法识别的运行时。

To be recognized as a node.js app, you must either have a server.js file or have a package.json file with a "scripts" section specifying a "start" command. 要被识别为node.js应用程序,您必须具有server.js文件或具有package.json文件的package.json文件,该文件的“ scripts”部分指定“ start”命令。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法将Node.js应用程序部署到Google Cloud App Engine - Unable to deploy node.js app to google cloud app engine Google App Engine gcloud app deploy error [5] using Node.js - Google App Engine gcloud app deploy error [5] using Node.js 在Google App Engine上部署Node.js,运行两次 - Deploy Node.js on Google app engine, running twice issue 我正在尝试将 Node.js 应用程序部署到 Google Cloud Platform,但在使用 MongoDB 时遇到错误 - I'm trying to deploy Node.js app to Google Cloud Platform but catching error with MongoDB Google App Engine 502 错误:服务器错误 Node.js - Google App Engine 502 Error: Server Error Node.js 如何在用户访问应用URL时在Google App Engine上部署node.js应用以便加载? - How to deploy node.js app on Google App Engine so it loads when user goes to app URL? 如何将 Node.js 应用程序从 GitHub 部署到 Google App Engine? - How do you deploy a Node.js app from GitHub to Google App Engine? 适用于Google App Engine Node.js应用中的Firebase项目的serviceAccountKey.json的安全路径 - secure path for serviceAccountKey.json for a Firebase project in Google App Engine Node.js app Google App Engine Node.js应用程序 - “解析app.yaml时出错:未知的网址处理程序类型” - Google App Engine Node.js App - “Error parsing app.yaml: Unknown url handler type” Node.js “node-cron”未在 Google 应用引擎上运行 - Node.js “node-cron” not running on Google app engine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM