我正在尝试在 flex 环境中部署应用引擎节点服务。下面是我的配置app.yaml
runtime: nodejs8
env: flex
#to name a service use below syntax
service: exampleNodeApp
env_variables:
NODE_ENV: "dev"
PORT: 3000
skip_files:
.env
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
该配置将使用 node8 映像。我package.json
的如下
{
"name": "expressapp",
"version": "1.0.0",
"private": true,
"main": "./bin/www",
"scripts": {
"start": "node ./bin/www",
},
"dependencies": {
"express": "~4.16.3",
}
}
我试过指定引擎也喜欢
{
"node": "~8.*"
}
并查看我使用的调试日志
gcloud app deploy --version default1 --verbosity=debug
我得到的错误如下。即使尝试了所有方法也无法解决。我的应用程序在本地运行良好。请帮忙!
--update-- 错误日志
UnsatisfiedRequirementsError: Your application does not satisfy all of the requirements for a runtime of type [nodejs8]. Please correct the errors and try again.
ERROR: (gcloud.app.deploy) Your application does not satisfy all of the requirements for a runtime of type [nodejs8]. Please correct the errors and try again.