问题描述
我正在尝试使用Firebase部署Web应用程序,但是每次运行部署时,都会不断出现此错误
Error: Parse Error in remoteconfig.template.json:
No data,empty input at 1:1
^
File: "remoteconfig.template.json"
解决方法
您在remoteconfig.template.json
文件中引用了firebase.json
,但是该模板不存在。通常如下所示:
"remoteconfig": {
"template": "remoteconfig.template.json"
}
解决方案是在firebase.json
文件中找到此部分,然后将其删除。
您收到此错误是因为在您的 firebase init 中您包含(或同意)远程配置。要使其与部署一起使用,您必须像这样在文件 remoteconfig.template.json 中添加至少一个参数;
{
"example_minimum_score_for_level_2": 500
}
,
正如@BenjaminRAIBAUD 评论的那样,如果 remoteconfig.template.json
为空,请尝试将 { }
添加到文件中。这对我有用。