问题描述
我尝试使用 Firebase 部署我的应用程序(在构建文件夹中我有一个 index.html 文件),但出现以下错误:
有人知道哪里出了问题吗?
解决方法
这实际上是您初始化项目时 Firebase CLI 自动生成的 index.html
文件中的默认内容。这不是错误;如果您已经准备好 HTML,只需将其粘贴到 index.html
文件夹内的 build
文件中。
您的屏幕截图显示的是本地 index.html
文件,请确保通过运行 firebase deploy --only hosting
来部署您的站点;还要仔细检查 firebase.json
文件中的 public 属性是否配置为采用 build
文件夹。