[英]When running "serve -s build" to serve my React build folder locally, no content renders
In my browser console, I get these errors:在我的浏览器控制台中,我收到以下错误:
Uncaught SyntaxError: Unexpected token '<' 2.e1e7f2e0.chunk.js:1未捕获的语法错误:意外的标记 '<' 2.e1e7f2e0.chunk.js:1
Uncaught SyntaxError: Unexpected token '<' main.c36879cd.chunk.js:1未捕获的语法错误:意外的标记 '<' main.c36879cd.chunk.js:1
Manifest: Line: 1, column: 1, Syntax error.清单:行:1,列:1,语法错误。 :5000/React-Portfolio/manifest.json:1*
:5000/React-Portfolio/manifest.json:1*
My app was built with create-react-app.我的应用程序是用 create-react-app 构建的。 It runs fine locally when I'm not running from the build folder.
当我不在构建文件夹中运行时,它在本地运行良好。 It has no back end.
它没有后端。
Thoughts?想法?
I needed to remove "homepage": XXX from my package.json.我需要从我的 package.json 中删除“主页”:XXX。
I found my solution here: https://newbedev.com/create-react-app-build-uncaught-syntaxerror-unexpected-token我在这里找到了我的解决方案: https : //newbedev.com/create-react-app-build-uncaught-syntaxerror-unexpected-token
我需要从我的 package.json 中删除“主页”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.