![](/img/trans.png)
[英]SparkContext Error - File not found /tmp/spark-events does not exist
[英]Firebase deploy error "page not found This file does not exist ..."
我创建了一个反应应用程序,它在本地运行良好。 为了在 firebase 中部署它,我使用firebase init
并按照步骤然后npm run build
和firebase deploy
。 现在我在已部署应用程序的主页上收到此错误。
Page Not Found该文件不存在,并且在当前目录中找不到 index.html 或在根目录中找到 404.html。 为什么我会看到这个? 您可能为您的应用程序部署了错误的目录。 检查您的 firebase.json 并确保公共目录指向包含 index.html 文件的目录。 您还可以在站点的根目录中添加 404.html 以将此页面替换为自定义错误页面。
这是firebase.json
文件的代码。
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
我的构建文件夹路径位于根目录中,如下所示:
我遇到了同样的问题,但现在它对我有用。
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [{
"source": "**",
"destination": "/index.html"
}]
}
}
要执行的 Cmd 的命令:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.