首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何访问从Firebase函数生成的Google构建日志文件

如何访问从Firebase函数生成的Google构建日志文件
EN

Stack Overflow用户
提问于 2020-10-05 13:27:13
回答 1查看 447关注 0票数 1

我的Google构建脚本被困在他的步骤中,它构建了角通用项目的服务器。我正在尝试访问日志,也许这有助于解决问题。

编辑#1

这是一个角度工程,这个构建是基于Firebase函数的角度通用构建。

代码语言:javascript
运行
复制
Starting Step #6
Step #6: Already have image: node:12.3
Step #6: 
Step #6: > supportfinity@0.0.0 stage-server /workspace
Step #6: > node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng run sf-mini:server:stage
Step #6: 
Step #6: Compiling angular2-query-builder : main as umd
Step #6: Killed
Step #6: npm ERR! code ELIFECYCLE
Step #6: npm ERR! errno 137
Step #6: npm ERR! supportfinity@0.0.0 stage-server: `node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng run sf-mini:server:stage`
Step #6: npm ERR! Exit status 137
Step #6: npm ERR! 
Step #6: npm ERR! Failed at the supportfinity@0.0.0 stage-server script.
Step #6: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Step #6: 
Step #6: npm ERR! A complete log of this run can be found in:
Step #6: npm ERR!     /builder/home/.npm/_logs/2020-10-05T12_48_55_502Z-debug.log
Finished Step #6

如何访问上面的日志。

这里还有构建yaml:

代码语言:javascript
运行
复制
steps:
- name: 'gcr.io/cloud-builders/docker'
  args: [ 'build', '-t' , 'gcr.io/$PROJECT_ID/firebase' , './dockerfiles/firebase']
- name: 'gcr.io/$PROJECT_ID/firebase'
  args: [ 'use', '$_PROJECT_NAME','--token', '${_FIREBASE_TOKEN}']
- name: 'node:12.3'
  entrypoint: npm
  args: ['install']
- name: 'node:12.3'
  entrypoint: npm
  args: ['install','--prefix','functions']
- name: 'node:12.3'
  entrypoint: npm
  args: ['link']
- name: 'node:12.3'
  entrypoint: npm
  args: ['run-script','stage-browser']
- name: 'node:12.3'
  entrypoint: npm
  args: ['run-script','--debug','build-server'] <== this one which cause problem
- name: 'node:12.3'
  entrypoint: npm
  dir:  'functions'
  args: ['run-script','copyAndRename']
- name: 'gcr.io/$PROJECT_ID/firebase'
  args: [ 'deploy','--debug', '--token', '${_FIREBASE_TOKEN}']
timeout: 2000s

从package.json构建命令

代码语言:javascript
运行
复制
    "build-server": "node --max_old_space_size=16384 ./node_modules/@angular/cli/bin/ng run sf-mini:server:production",
    "stage-browser": "node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng build --prod --configuration=stage --aot --vendor-chunk --common-chunk --delete-output-path",
EN

回答 1

Stack Overflow用户

发布于 2020-10-05 17:30:59

可能是记忆问题。有几个有错误代码137的GitHub [1] [2]问题,它们可以通过增加内存来解决这个问题。

编辑:,正如注释中提到的,您将无法访问/builder日志,因为单独的虚拟机运行构建步骤。

然而,这可能会帮助您理解是什么导致了问题。Firebase函数中的有效最大内存值是2 2GB,但是使用--max_old_space_size将内存增加到16 8GB (构建)和8GB(阶段)。这可能有助于解释为什么要将其从内存代码中删除。

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64209563

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档