L
L
linikolay942020-09-08 02:31:27
React
linikolay94, 2020-09-08 02:31:27

React how to fix? Uncaught SyntaxError: Unexpected token?

The essence of such a project on LAN plows everything well.
I collect it and upload it to the server and when I switch to a new tab, I get the error
Uncaught SyntaxError: Unexpected token '<'
and if I switch from the same tab, everything is fine, I use it to go to what to do is not clear

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2020-09-08
@Robur

Well, the first thing to do is figure out what's going on. A mistake is a mistake, but you need to know how to dig, this is a useful skill. how to ask questions correctly - in addition to the error, there is still a lot of useful information that can also be written in the question. For example, the server response, URLs, how the routing is configured, and so on.
pointing a finger at the sky, I’ll say that when you request .js files, the server returns html instead. check and if so - deal with its config.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question