Manifest.json意外令牌 [英] Manifest.json Unexpected Token

查看:168
本文介绍了Manifest.json意外令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我将一个react/express项目推到了heroku( https://polar-oasis- 57801.herokuapp.com/),并在控制台中收到以下错误: Chrome控制台错误消息

Hello I pushed a react/express project up to heroku (https://polar-oasis-57801.herokuapp.com/) and received the following errors in the console: Chrome console error messages

我尝试查找此错误,似乎我需要更改manifest.json文件中的某些内容,但不确定.任何建议都会有所帮助.这是我的清单文件:

I tried looking up this error and it seems that I need to change something in my manifest.json file but I'm not sure. Any advice would help. Here's my manifest file:

{
  "short_name": "React App",
  "name": "Create React App Sample",
  "icons": [
    {
      "src": "favicon.ico",
      "sizes": "64x64 32x32 24x24 16x16",
      "type": "image/x-icon"
    }
  ],
  "start_url": ".",
  "display": "standalone",
  "theme_color": "#000000",
  "background_color": "#ffffff"
}

还有我在Github上的项目: https://github.com/bernar83/cat-cards

And also my project on Github: https://github.com/bernar83/cat-cards

推荐答案

我在server.js文件中添加了此更改"/cat-cards/",所以现在它是app.use("/cat-cards/", express.static("client/build"));.添加该更改并将其推送到Heroku可以使我的网站正常工作.这对我有帮助: https://github.com/facebook/create-react-app/issues/1812#issuecomment-286511320

I added this change "/cat-cards/" in my server.js file so now it's app.use("/cat-cards/", express.static("client/build"));. Adding that change and pushing to Heroku made my website work. This helped me: https://github.com/facebook/create-react-app/issues/1812#issuecomment-286511320

这篇关于Manifest.json意外令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆