问题描述
我们的nodejs应用程序在GAE Standard中可以正常运行.但是我们需要使用websockets,因此我们将使用Flex.但是,我们在Flex中遇到了各种各样的构建时问题.
Our nodejs application works fine in GAE Standard. But we need to use websockets so we are going with Flex. However we are running into all sorts of build-time issues with Flex.
因此,我们希望通过 gcp-build
步骤来部署GAE Flex,但会遇到各种错误,例如:
So we want to deploy a GAE Flex with a gcp-build
step, but are getting all sorts of errors such as:
步骤1:错误构建映像:错误构建阶段:symlink/app/packages/node_modules/autoprefixer/bin/autoprefixer/app/packages/client/node_modules/.bin/autoprefixer:文件存在
并且在修补此错误之后,还会出现此错误:
and also, after patching that, comes this error:
错误构建映像:读取tcp 192.168.10.2:54502->74.125.20.128:443:读取:对等方重置连接
我们正在使用lerna的单仓库应用程序,而我们的 gcp-build
脚本仅执行: yarn build
,随后执行:"build":"lerna运行build --scope = client --scope = server --scope = common --stream"
We are on a mono-repo app with lerna and our gcp-build
script just does: yarn build
which subsequently does: "build": "lerna run build --scope=client --scope=server --scope=common --stream"
我们有一种预感, gcp-build
仅适用于标准env,而不适用于flex.如果确实如此,您将如何建议我们在GAE Flex中运行构建步骤?如果不是,那么所有这些建筑物图像"错误又是怎么回事?用相同的代码在GAE Standard中一切都很好!
We have a hunch that gcp-build
is only for the standard env and not flex. If that is truly so, how would you recommend us to run a build step in GAE Flex? And if not, what is with all these 'building image' errors? All is fine in GAE Standard with the same code!
推荐答案
最后使我们的Flex服务器开始运行.因此,这是我最初的问题的答案:
Finally got our flex server running. So here are the answers to my initial questions:
首先,错误步骤1:错误构建映像:错误构建阶段:symlink/app/packages/node_modules/autoprefixer/bin/autoprefixer/app/packages/client/node_modules/.bin/autoprefixer:file存在通过运行 yarn build&&rm -rf ./packages/client/node_modules
在我们的gcp-build步骤中.
Firstly, the error Step #1: error building image: error building stage: symlink /app/packages/node_modules/autoprefixer/bin/autoprefixer /app/packages/client/node_modules/.bin/autoprefixer: file exists
was solved by running yarn build && rm -rf ./packages/client/node_modules
in our gcp-build step.
无法复制关于错误建筑物映像的第二个错误:读取tcp 192.168.10.2:54502->74.125.20.128:443:读取:对等方重置连接
,后来发现这可能是由于如下引用的gcloud支持代理的建议,在部署期间我的互联网连接掉线了:
Cannot repro the second error about error building image: read tcp 192.168.10.2:54502->74.125.20.128:443: read: connection reset by peer
and later found that it was probably due to my internet connection dropping out during the deployment as advised by a gcloud support agent quoted below:
最后,关于第三个问题,即gcp-build是否仅适用于标准env而不适用于flex.这不是真的.如同一代理人所引用,它既可以在标准版中也可以在flex版中使用:
Lastly, regarding the third question about whether gcp-build is only for the standard env and not flex. It's not true. It works in both standard and flex as quoted by the same agent:
这篇关于当标准适用于相同代码时,为什么Google App Engine Flex构建步骤会失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!