您好,我将react / express项目推送到heroku(https://polar- oasis-57801.herokuapp.com/),并在控制台中收到以下错误: Chrome控制台错误消息
我尝试查找此错误,似乎我需要更改manifest.json文件中的某些内容,但不确定。任何建议都会有所帮助。这是我的清单文件:
{ "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
我"/cat-cards/"在server.js文件中添加了此更改,现在为app.use("/cat-cards/", express.static("client/build"));。添加该更改并推送到Heroku后,我的网站开始运作。这对我有帮助:https : //github.com/facebook/create- react- app/issues/1812#issuecomment-286511320
"/cat-cards/"
app.use("/cat-cards/", express.static("client/build"));