React和Firebase部署:空白页

时间:2019-02-12 16:55:08

标签: reactjs firebase deployment

我正在尝试将我的应用程序部署到Firebase。这是一个一页的应用程序。我在以前的部署中取得了成功,在开发的开始阶段,看看Redux和Router是否正常工作。但是现在在我部署的最后阶段,我得到了空页面,我不知道为什么。我知道它与它有关,应该是一个javascript文件,当它看到<它崩溃时,却不知道为什么...

它给我错误

Uncaught SyntaxError: Unexpected token <    
Uncaught SyntaxError: Unexpected token <
Manifest: Line: 1, column: 1, Unexpected token.

firebase init时我选择了

 What do you want to use as your public directory? build 
 ? Configure as a single-page app (rewrite all urls to /index.html)? Yes 
 ? File build/index.html already exists. Overwrite? No

我的firebase.json看起来像这样

{
  "database": {
    "rules": "database.rules.json"
  },
  "hosting": {
    "public": "build",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
    ]
  }
}

My package.json

1 个答案:

答案 0 :(得分:0)

我遇到类似的问题。摆脱语法错误。在每个文件的每次导入之后,我都必须使用分号...尽管我还没有找到解决清单错误的正确方法。

相关问题