Firebase默认托管域:仅.firebaseapp.com有效,但.web.app失败 [英] Firebase default hosting domains: only .firebaseapp.com works but .web.app fails
问题描述
我正在使用打字稿构建一个非常简单的一页反应应用程序.我尝试使用Firebase Hosting托管它.令人惊讶的是,只有域 [name] .firebaseapp.com 有效,但是 [name] .web.app 显示未找到站点".默认页面:
I'm building a very simple one-page react application using typescript. I tried hosting it using Firebase Hosting. Surprisingly, only the domain [name].firebaseapp.com works but [name].web.app shows the "Site not found" default page:
我正在使用基本的firebase配置(使用 firebase init
获得的默认配置):
I am using a basic firebase config (the default one you get using firebase init
):
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}
我得到未找到网站"当我继续 [name] .web.app 时.我本来怀疑 index.html
,重写,构建文件夹等有问题,但是为什么我会在 [name] .firebaseapp上看到页面功能.com 并很好地托管,应该是吗?
I get the "Site not found" when I go on [name].web.app. I would have suspected something was wrong with the index.html
, the rewrites, the build folder, etc... but then why would I see the page functional on [name].firebaseapp.com and hosted nicely and it should be?
我怀疑有几件事:
- 无法从firebase本身获取域名(尽管在创建项目时,firebase为什么会将该域名命名为无效的域名)
- 仅将文件推送到 [name] .firebaseapp.com 域(在这种情况下,您如何控制该域?)
- The domain name is not available from firebase itself (although why would firebase name the domain something that is invalid if that was the case when creating the project)
- The files are being pushed to the [name].firebaseapp.com domain only (in that case, how can you control that?)
推荐答案
更新:
我通过电子邮件向Firebase的客户支持发送了电子邮件,第二天该域正常运行.没有提供有关问题发生原因的解释,但通过电子邮件将其解决.
I emailed customer support at firebase, and the next day the domain was working normally. No explanation was provided on why the issue occurred, but emailing them solved it.
这篇关于Firebase默认托管域:仅.firebaseapp.com有效,但.web.app失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!