Home > Software engineering >  Moved the repository from github, and get 3 SyntaxErrors `Unexpected token`
Moved the repository from github, and get 3 SyntaxErrors `Unexpected token`

Time:11-03

Bought a new laptop, moved the repository from github to it. The API server runs successfully, but when I start the server with react I get 3 errors in the browser console:

Uncaught SyntaxError: Unexpected token '<' bundle.js:1 
Uncaught SyntaxError: Unexpected token '<' vendors~main.chunk.js:1 
Uncaught SyntaxError: Unexpected token '<' main.chunk.js:1  

There are no errors in the editor console.

UPD after answering

If anyone has the same problem with git, I solved it by uploading the repository as a zip file.

CodePudding user response:

The server is returning HTML when you are expecting JSON. The problem is most likely incorrect URL path somewhere in your code or .env file.

  • Related