Node.js 如何将nodejs代码从本地机器部署到googleappengine

Node.js 如何将nodejs代码从本地机器部署到googleappengine,node.js,git,google-app-engine,Node.js,Git,Google App Engine,我刚刚开始使用nodejs和appengine。我正在学习教程 1) 我创建了一个项目,然后克隆了nodejs-mvms-quickstart存储库 2) 打开Development/source code并打开nodejs-mvms-quickstart/1-hello-world 3) 并启动了节点服务器 npm start 这很好用。现在,我想从本地服务器部署我的nodejs应用程序,而无需复制到github并在服务器上克隆 为此,我使用以下命令 gcloud app deploy

我刚刚开始使用nodejs和appengine。我正在学习教程

1) 我创建了一个项目,然后克隆了
nodejs-mvms-quickstart
存储库

2) 打开
Development/source code
并打开
nodejs-mvms-quickstart/1-hello-world

3) 并启动了节点服务器

npm start
这很好用。现在,我想从本地服务器部署我的nodejs应用程序,而无需复制到github并在服务器上克隆

为此,我使用以下命令

gcloud app deploy
但这显示出以下错误:

If this is your first deployment, this may take a while...done.

Beginning deployment of service [default]...
Building and pushing image for service [default]
WARNING: No node version specified.  Please add your node version, see https://docs.npmjs.com/files/package.json#engines
Some files were skipped. Pass `--verbosity=info` to see which ones.
You may also view the gcloud log file, found at
[C:\Users\Sunil Garg\AppData\Roaming\gcloud\logs\2017.05.07\20.38.59.221000.log]
.
Started cloud build [1cd2979e-527b-4d68-b430-31471534246e].
To see logs in the Cloud Console: https://console.cloud.google.com/gcr/builds/1c
d2979e-527b-4d68-b430-31471534246e?project=help-coin
ERROR: gcloud crashed (error): [Errno 10054] An existing connection was forcibly
 closed by the remote host

If you would like to report this issue,please run the following command:
  gcloud feedback

To check gcloud for common problems,please run the following command:
  gcloud info --run-diagnostics
这是我的
package.json

{
  "name": "myapp",
  "version": "1.0.0",
  "description": "myapp",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": ""
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": ""
  },
  "homepage": "",
  "dependencies": {
    "body-parser": "^1.15.0",
    "connect-timeout": "^1.8.0",
    "express": "^4.13.4",
    "generic-pool": "^2.4.2",
    "multer": "^1.2.0",
    "mysql": "^2.10.2",
    "requestify": "^0.1.17"
  }
}

问题是什么?我遗漏了什么吗?

尝试将以下两个参数添加到package.json中

添加应用程序与之兼容的节点版本

"engines": {
    "node": "4.6.0"
    }
由于您使用的是
npm start
,您可能也需要在脚本参数中使用它,因为npm start正在调用脚本参数中start中声明的命令,请根据您的应用程序更改
app.js
,如
node quickstart.js
。如果package.json在根目录中,并且
.js
也在子目录中,请始终确保指定路径

"scripts": {
  "start": "node app.js"
}

尝试将以下2个参数添加到package.json

添加应用程序与之兼容的节点版本

"engines": {
    "node": "4.6.0"
    }
由于您使用的是
npm start
,您可能也需要在脚本参数中使用它,因为npm start正在调用脚本参数中start中声明的命令,请根据您的应用程序更改
app.js
,如
node quickstart.js
。如果package.json在根目录中,并且
.js
也在子目录中,请始终确保指定路径

"scripts": {
  "start": "node app.js"
}

你能把包裹寄出去吗。json@KalanaDemel更新了我的问题。你能把包裹寄出去吗。json@KalanaDemel更新了我的问题