嗨,我已经完成了
firebase init
和firebase deploy --only hosting
。它显示了成功的模态消息
“欢迎光临 Firebase 托管设置完成
您看到此消息是因为您已成功设置 Firebase 托管。现在是时候去创造一些非凡的东西了!”
但是它没有显示我的网站。
我已经尝试过 Firefox 和 IE Edge,但仍然显示相同的消息。
请查看我的 firebase.json 文件:
{
"functions": [
{
"source": "functions",
"codebase": "default",
"ignore": [
"node_modules",
".git",
"firebase-debug.log",
"firebase-debug.*.log"
]
}
],
"database": {
"rules": "database.rules.json"
},
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"hosting": {
"public": "dist/cook4u",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"storage": {
"rules": "storage.rules"
},
"emulators": {
"auth": {
"port": 9099
},
"functions": {
"port": 5001
},
"firestore": {
"port": 8080
},
"database": {
"port": 9000
},
"hosting": {
"port": 5000
},
"pubsub": {
"port": 8085
},
"storage": {
"port": 9199
},
"eventarc": {
"port": 9299
},
"ui": {
"enabled": true
},
"singleProjectMode": true
},
"remoteconfig": {
"template": "remoteconfig.template.json"
}
}
我已经尝试过stackoverflow和其他网站上的解决方案。它不能解决我的问题。我已确认我的index.html 和所有源代码都在我的公共文件夹中。另外,如何确定哪个页面是我网站的登陆页面?
这是我的公共文件夹。我有什么遗漏的吗?
Dist文件夹截图:
这是我运行部署命令时的输出:
项目控制台:https://console.firebase.google.com/project/cook4u-b3b8d/overview 托管网址:https://cook4u-b3b8d.web.app
删除您的 .firebase 文件
不使用此更改您的index.html文件