简体   繁体   English

无法将Node.js应用程序部署到Google Cloud App Engine

[英]Unable to deploy node.js app to google cloud app engine

I have an API deployed to google cloud app engine working correctly. 我已将一个API部署到Google Cloud App Engine正常工作。 I did a successfully deploy yesterday (Nov 26) and everything flows well. 我昨天(11月26日)进行了成功部署,一切进展顺利。

But today, without changing my app.yaml file or installed any new dependecies (my package.json and package-lock.json are the same), I'm not able to deploy it anymore. 但是今天,如果不更改我的app.yaml文件或安装任何新的依赖项(我的package.jsonpackage-lock.json是相同的),我将无法再部署它。

The error message is not helping me and I have no idea where this bug came from (error after gcloud app deploy ): 错误消息没有帮助我,我也不知道此错误的来源( gcloud app deploy后的错误):

starting build "0e9f3841-1627-44b2-92f1-97745eb6b73f"

FETCHSOURCE
BUILD
Starting Step #0 - "fetcher"
Step #0 - "fetcher": Already have image (with digest): gcr.io/cloud-builders/gcs-fetcher
Step #0 - "fetcher": Fetching manifest gs://staging.emcantomeu-api.appspot.com/ae/60a880db-d388-4db3-9bef-9d233841ff13/manifest.json.
Step #0 - "fetcher": Processing 82 files.
Step #0 - "fetcher": ******************************************************
Step #0 - "fetcher": Status: SUCCESS
Step #0 - "fetcher": Started: 2018-11-27T18:06:20Z
Step #0 - "fetcher": Completed: 2018-11-27T18:06:23Z
Step #0 - "fetcher": Requested workers: 200
Step #0 - "fetcher": Actual workers: 82
Step #0 - "fetcher": Total files: 82
Step #0 - "fetcher": Total retries: 2
Step #0 - "fetcher": GCS timeouts: 2
Step #0 - "fetcher": MiB downloaded: 7.75 MiB
Step #0 - "fetcher": MiB/s throughput: 3.40 MiB/s
Step #0 - "fetcher": Time for manifest: 864.31 ms
Step #0 - "fetcher": Total time: 3.15 s
Step #0 - "fetcher": ******************************************************
Finished Step #0 - "fetcher"
Starting Step #1 - "builder"
Step #1 - "builder": Pulling image: gcr.io/gae-runtimes/nodejs10_app_builder:nodejs10_10_13_0_20181111_RC00
Step #1 - "builder": nodejs10_10_13_0_20181111_RC00: Pulling from gae-runtimes/nodejs10_app_builder
Step #1 - "builder": Digest: sha256:dcaad09757154246bebf1c802bb43b7002301409d9261ad21faa1864a9138d69
Step #1 - "builder": Status: Downloaded newer image for gcr.io/gae-runtimes/nodejs10_app_builder:nodejs10_10_13_0_20181111_RC00
Step #1 - "builder": INFO FTL version node-v0.11.0
Step #1 - "builder": INFO Beginning FTL build for node
Step #1 - "builder": INFO FTL arg passed: exposed_ports None
Step #1 - "builder": INFO FTL arg passed: cache_repository us.gcr.io/emcantomeu-api/app-engine-tmp/build-cache/ttl-7d
Step #1 - "builder": INFO FTL arg passed: tar_base_image_path None
Step #1 - "builder": INFO FTL arg passed: builder_output_path /builder/outputs
Step #1 - "builder": INFO FTL arg passed: name us.gcr.io/emcantomeu-api/app-engine-tmp/app/ttl-2h:60a880db-d388-4db3-9bef-9d233841ff13
Step #1 - "builder": INFO FTL arg passed: ttl 168
Step #1 - "builder": INFO FTL arg passed: global_cache False
Step #1 - "builder": INFO FTL arg passed: cache True
Step #1 - "builder": INFO FTL arg passed: upload True
Step #1 - "builder": INFO FTL arg passed: sh_c_prefix False
Step #1 - "builder": INFO FTL arg passed: fail_on_error True
Step #1 - "builder": INFO FTL arg passed: base gcr.io/gae-runtimes/nodejs10:nodejs10_10_13_0_20181111_RC00
Step #1 - "builder": INFO FTL arg passed: output_path None
Step #1 - "builder": INFO FTL arg passed: cache_key_version v0.11.0
Step #1 - "builder": INFO FTL arg passed: cache_salt 
Step #1 - "builder": INFO FTL arg passed: directory /workspace
Step #1 - "builder": INFO FTL arg passed: entrypoint None
Step #1 - "builder": INFO FTL arg passed: additional_directory None
Step #1 - "builder": INFO FTL arg passed: destination_path /srv
Step #1 - "builder": INFO FTL arg passed: verbosity NOTSET
Step #1 - "builder": INFO starting: full build
Step #1 - "builder": INFO starting: builder initialization
Step #1 - "builder": INFO Loading Docker credentials for repository 'gcr.io/gae-runtimes/nodejs10:nodejs10_10_13_0_20181111_RC00'
Step #1 - "builder": INFO Loading Docker credentials for repository 'us.gcr.io/emcantomeu-api/app-engine-tmp/app/ttl-2h:60a880db-d388-4db3-9bef-9d233841ff13'
Step #1 - "builder": INFO builder initialization took 0 seconds
Step #1 - "builder": INFO starting: build process for FTL image
Step #1 - "builder": INFO starting: rm_node_modules
Step #1 - "builder": INFO rm_node_modules rm -rf /workspace/node_modules
Step #1 - "builder": INFO `rm_node_modules` stdout:
Step #1 - "builder": 
Step #1 - "builder": INFO rm_node_modules took 0 seconds
Step #1 - "builder": INFO starting: checking_cached_packages_json_layer
Step #1 - "builder": DEBUG Checking cache for cache_key e21be12699e5e087245dc8e246f7a17e1d5571d3c7dc004195afa63b46b39fc9
Step #1 - "builder": INFO No cached base image found for entry: us.gcr.io/emcantomeu-api/app-engine-tmp/build-cache/ttl-7d/node-cache:e21be12699e5e087245dc8e246f7a17e1d5571d3c7dc004195afa63b46b39fc9.
Step #1 - "builder": INFO Cache miss on local cache for us.gcr.io/emcantomeu-api/app-engine-tmp/build-cache/ttl-7d/node-cache:e21be12699e5e087245dc8e246f7a17e1d5571d3c7dc004195afa63b46b39fc9
Step #1 - "builder": INFO No cached dependency layer for e21be12699e5e087245dc8e246f7a17e1d5571d3c7dc004195afa63b46b39fc9
Step #1 - "builder": INFO [CACHE][MISS] v0.11.0:NODE->e21be12699e5e087245dc8e246f7a17e1d5571d3c7dc004195afa63b46b39fc9
Step #1 - "builder": INFO checking_cached_packages_json_layer took 0 seconds
Step #1 - "builder": INFO starting: building_packages_json_layer
Step #1 - "builder": INFO starting: npm_install
Step #1 - "builder": INFO npm_install npm install --production
Step #1 - "builder": INFO `npm_install` stdout:
Step #1 - "builder": 
Step #1 - "builder": INFO `npm_install` had stderr output:


Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/empower-core-17c5c138/package.json'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/empower-core-17c5c138/CHANGELOG.md'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/empower-core-17c5c138/index.js'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/empower-core-17c5c138/README.md'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/lodash-321678b3/each.js'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/lodash-321678b3/constant.js'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/lodash-321678b3/eachRight.js'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/lodash-321678b3/conforms.js'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/lodash-321678b3/endsWith.js'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/lodash-321678b3/cond.js'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/lodash-321678b3/entries.js'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/protobufjs-5cf86b95/dist/light/README.md'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/lodash-321678b3/concat.js'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/bluebird-e8847f49/js/browser/bluebird.min.js'

....
....
....

Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/fsevents-355423a2/node_modules/iconv-lite/encodings/tables/shiftjis.json'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, lstat '/workspace/node_modules/.staging/google-proto-files-4307fece/google/iam/v1/logging'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/google-proto-files-4307fece/google/iam/v1/policy.proto'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, lstat '/workspace/node_modules/.staging/google-proto-files-4307fece/google/logging'
Step #1 - "builder": npm WARN platform-api@1.0.0 No repository field.
Step #1 - "builder": 
Step #1 - "builder": npm ERR! code E404
Step #1 - "builder": npm ERR! 404 Not Found: flatmap-stream@0.1.1
Step #1 - "builder": 
Step #1 - "builder": npm ERR! A complete log of this run can be found in:
Step #1 - "builder": npm ERR! /builder/home/.npm/_logs/2018-11-27T18_06_41_641Z-debug.log
Step #1 - "builder": 
Step #1 - "builder": ERROR error: `npm_install` returned code: 1
Step #1 - "builder": INFO npm_install took 15 seconds
Step #1 - "builder": INFO building_packages_json_layer took 15 seconds
Step #1 - "builder": INFO build process for FTL image took 15 seconds
Step #1 - "builder": INFO full build took 15 seconds
Step #1 - "builder": ERROR `npm_install` had stderr output:


Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/empower-core-17c5c138/package.json'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/empower-core-17c5c138/CHANGELOG.md'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/empower-core-17c5c138/index.js'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/empower-core-17c5c138/README.md'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/lodash-321678b3/each.js'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/lodash-321678b3/constant.js'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/lodash-321678b3/eachRight.js'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/lodash-321678b3/conforms.js'
Step #1 - "builder": npm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/lodash-321678b3/endsWith.js'

Step #1 - "builder": npm WARN platform-api@1.0.0 No repository field.
Step #1 - "builder": 
Step #1 - "builder": npm ERR! code E404
Step #1 - "builder": npm ERR! 404 Not Found: flatmap-stream@0.1.1
Step #1 - "builder": 
Step #1 - "builder": npm ERR! A complete log of this run can be found in:
Step #1 - "builder": npm ERR! /builder/home/.npm/_logs/2018-11-27T18_06_41_641Z-debug.log
Step #1 - "builder": 
Step #1 - "builder": error: `npm_install` returned code: 1
Finished Step #1 - "builder"
ERROR
ERROR: build step 1 "gcr.io/gae-runtimes/nodejs10_app_builder:nodejs10_10_13_0_20181111_RC00" failed: exit status 1

app.yaml file: app.yaml文件:

runtime: nodejs8

ps 1: I'm correctly authenticated ( gcloud auth login ). ps 1:我已正确通过身份验证( gcloud auth login )。

ps 2: I'm using the right project ( gcloud config set project <MY_PROJECT_ID> ) ps 2:我使用的项目正确( gcloud config set project <MY_PROJECT_ID>

ps 3: I already created a new gcloud project and when I tried to deploy and I got the same error. ps 3:我已经创建了一个新的gcloud项目,当我尝试进行部署时遇到了同样的错误。

Anybody has any idea? 有人知道吗?

flatmap-stream has been removed from npm here flatmap-stream已经从被删除npm 这里

That's why it is getting a 404 error. 这就是为什么它会显示404错误。 Make sure to update the dependant package that is using flatmap-stream , maybe the new version is not using that anymore. 确保更新使用flatmap-stream的依赖包,也许新版本不再使用它。

This nodemon issue has some useful information. nodemon问题具有一些有用的信息。

暂无
暂无

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

相关问题 尝试将Node.js项目部署到Google App Engine时出错 - Error trying to deploy Node.js project to Google app engine 在Google App Engine上部署Node.js,运行两次 - Deploy Node.js on Google app engine, running twice issue 为 Google Cloud App Engine 灵活指定 Node.js 版本 - Specifying Node.js version for Google Cloud App Engine Flexible 如何在 Google Cloud App Engine for Node.js 中使用 Memcache - How to use Memcache in Google Cloud App Engine for 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 gcloud app deploy error [5] using Node.js - Google App Engine gcloud app deploy error [5] using Node.js 如何保留部署在谷歌云应用引擎上的 node.js 应用的统计数据并保持我的数据持久化 - How to keep stats for a node.js app deployed on google cloud app engine and keep my data persistent 我正在尝试将 Node.js 应用程序部署到 Google Cloud Platform,但在使用 MongoDB 时遇到错误 - I'm trying to deploy Node.js app to Google Cloud Platform but catching error with MongoDB Winston不会在Google Cloud Compute Engine上托管的Node.js应用程序的制作版本中记录事件 - Winston not logging events in productions version of a Node.js app hosted on Google Cloud Compute Engine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM