Unexpected token '<' in react
Closed this issue · 2 comments
TheFoolG commented
Hi,
“Unexpected token '<' error” occurs when referring to the file “/lib/mergely. Js”. I'm using the react framework, so can mergely be used in react?
Thanks!
wickedest commented
Yes, it should work, but I haven't tried. Look closely at the developer console (F12). Are there any other errors, line numbers? In HTTP traffic, look at the actual HTTP response. Sometimes, a 404 might return "", and give you that "Unexpected token '<'" error.
TheFoolG commented
Oh, I see. I used the dva framework. Due to the path of js files introduced by react, the 'lib' file should be placed in the 'public' folder and modified accordingly