0
我最近在Google App Engine中设置了一个Node.js应用程序,它运行良好。我试图添加处理程序,以便所有对网站的请求都可以重定向到https URL。下面是我app.yaml
文件Google App Engine Node.js App - “错误解析app.yaml:未知的URL处理程序类型”
# [START runtime]
runtime: nodejs
vm: true
# [END runtime]
# Temporary setting to keep gcloud from uploading node_modules
skip_files:
- ^node_modules$
# [START handlers]
handlers:
- url: /.*
secure: always
# [END handlers]
当我试图运行上传脚本,gcloud preview app deploy app.yaml
,它会抛出异常如下:
ERROR: (gcloud.preview.app.deploy) An error occurred while parsing file: [/Users/rakesharidasan/BackwaterBreaks-UI-Release/app.yaml]
Unknown url handler type in line 14, column 17 (end of # [END handlers]).
我可以看到StackOverflow的类似的问题,但其中许多人被有关缩进或空白空间问题。我相信我的app.yaml得到了正确的缩进,我通过几个在线解析器进行了检查,例如 - http://codebeautify.org/yaml-validator
如果我从yaml中删除处理程序部分,上传脚本仍将运行。
任何想法这里出了什么问题?
完美!这解决了这个问题。如果应用引擎上传脚本提供了更好的错误消息,它应该是非常好的。非常感谢您的帮助@ jeffrey-godwyll – Rakes