Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js gcloud部署失败nodejs_Node.js_Google App Engine - Fatal编程技术网

Node.js gcloud部署失败nodejs

Node.js gcloud部署失败nodejs,node.js,google-app-engine,Node.js,Google App Engine,我正在尝试部署到谷歌应用程序引擎。当我这样做时,初始信息似乎都是正确的,docker构建成功,但docker尝试以下操作后失败: Beginning teardown of remote build environment (this may take a few seconds). Updating module [default].../Deleted [https://www.googleapis.com/compute/v1/projects/jamsesh-1219/zones/us-

我正在尝试部署到谷歌应用程序引擎。当我这样做时,初始信息似乎都是正确的,docker构建成功,但docker尝试以下操作后失败:

Beginning teardown of remote build environment (this may take a few seconds).
Updating module [default].../Deleted [https://www.googleapis.com/compute/v1/projects/jamsesh-1219/zones/us-central1-f/instances/gae-builder-vm-20160213t114355].
Updating module [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [13] Timed out when starting VMs.  It's possible that the application code is unhealthy.  (0/2 ready, 2 still deploying). 
我知道我正在运行es6代码,并将其传输到节点4.1.2上运行,这是我被告知可以使用的版本-我只需运行
nvm install v4.1.2
,它将切换我,因此我将其包含在脚本中。以下是我在package.json中的脚本:

"scripts": {
    "test": "test",
    "clean": "rm -rf lib",
    "watch-js": "./node_modules/.bin/babel --plugins transform-es2015-classes src --presets react -d lib",
    "dev-server": "./node_modules/.bin/webpack lib/client/entry.js",
    "lint": "./node_modules/.bin/eslint ./src",
    "server": "node lib/server/server",
    "start-dev": "npm run lint && npm run build && npm run dev-server && npm run server",
    "start": "nvm install v4.1.2 && node lib/server/server",
    "styles": "./node_modules/.bin/lessc ./public/less/bundle.less ./public/css/bundle.css",
    "build": "npm run clean && ./node_modules/.bin/babel --plugins transform-es2015-classes src --presets react -d lib && npm run styles"
  },
和我的docker文件:

# Dockerfile extending the generic Node image with application files for a
# single application.
FROM gcr.io/google_appengine/nodejs
COPY . /app/
# You have to specify "--unsafe-perm" with npm install
# when running as root.  Failing to do this can cause
# install to appear to succeed even if a preinstall
# script fails, and may have other adverse consequences
# as well.
# This command will also cat the npm-debug.log file after the
# build, if it exists.
RUN npm install --unsafe-perm || \
  ((if [ -f npm-debug.log ]; then \
  cat npm-debug.log; \
fi) && false)
CMD npm start

是的,我不知道为什么部署失败了。我肯定可以从一些关于在GAE上部署node的更全面的文档中获益。它适用于测试回购。我还需要做些什么来使用babel6传输代码在GAE上运行node?或者我的脚本应该有所不同?在Google Shell中,一旦切换到节点v4.1.2,我就可以在本地正常运行。我放弃了GAE,转而使用Digital Ocean,因为GAE的功能超出了我的需要,无法正常工作。由于Digital Ocean是一个IaaS,因此与之相当的Google服务是Compute Engine,它为您提供完整的虚拟机实例。您可能仍然有兴趣比较上的服务。对实际问题没有想法吗?