Uncaught SyntaxError: Unexpected token '<' #4
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi
First of all I rised an issue in your ssf repository which I'll close in a second, it turned out that actually frac is causing this error.
I ran "yarn add frac". I haven't done any imports of this library in my existing project just ran "yarn add frac". After that I ran"yarn install" to install all dependencies and then "yarn start".
No compilation error just "Uncaught SyntaxError: Unexpected token '<'" in chrome console
image
Tried on react-scripts versions 3.4.0 - not working,
3.3.1 - not working,
3.2.0 WORKING :)
So if react-scripts in version 3.2.0 works just fine is it something that you guys could fix or is it something wrong with react-scripts
Because of this error library xlsx is not working since ssf is one of it's dependencies and frac is the only dependency of ssf :)
node v. 12.13.1
yarn v. 1.21.1
Windows 10 v.1809 - I have suspicion that on linux everything is fine
This sounds like an issue with react-scripts, and https://github.com/facebook/create-react-app/issues/8398 has a suggestion. Can you try following the steps (eject your app, change the webpack config) and see if it works? If it does, I recommend raising a new issue with CRA;.
https://github.com/facebook/create-react-app/issues/8490 - this thread helped me to solve my issue
I had unexpected token because I used PUBLIC_PATH variable in .env file
PUBLIC_PATH:/my-app/
I didn't have this variable in .env.development file.
So in react-scripts 3.2.0 it was by default "/" and after I updated react scripts it was failing with unexpected token error. I simply added PUBLIC_PATH:/ to my .env.development file.