Create-React-App build - “Uncaught SyntaxError: Unexpected token <”

后端 未结 9 1441
予麋鹿
予麋鹿 2020-12-10 10:35

I realize this question has been asked multiple times but nothing has worked for me...

I\'m trying to create a static build of a create-react-app projec

9条回答
  •  执念已碎
    2020-12-10 11:03

    I had faced the same issue when deploying my react build to production. After spending hours trying to figure out what went wrong on a previously working code, I figured out a mistake I made in deployment.

    I hadn't copied the folder static inside build to the server because I used scp build/* to copy the build folder in place of scp -r build/*.

    I understand that this is not the exact answer to the question asked here. But I had tried out almost all possible options from answers given by experts here before I noticed the error I was making. Hence, adding this here as a pointer to anyone facing similar issue to verify the deployment steps as well.

提交回复
热议问题