Uncaught SyntaxError: Unexpected token <
See original GitHub issueIs this a bug report?
yes
Did you try recovering your dependencies?
yes
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
Environment
(paste the output of the command here)
Steps to Reproduce
(Write your steps here:)
- created a sample app
- added fonts in index.html as <script type="text/javascript" src="fonts/20180409.js"></script>
- throws error
Expected Behavior
should load fonts
(Write what you thought would happen.)
Actual Behavior
Uncaught SyntaxError: Unexpected token <
(Write what happened. Please add screenshots!)
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Uncaught SyntaxError: Unexpected token : - Stack Overflow
An "unexpected token" is likely some illegal character code. Such a code is likely not to show up when you print to console....
Read more >SyntaxError: Unexpected token - JavaScript - MDN Web Docs
The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided.
Read more >SyntaxError: Unexpected token in JavaScript | bobbyhadz
The "Uncaught SyntaxError: Unexpected token" occurs for multiple reasons: · The error is also caused if you're making an HTTP request to a...
Read more >Uncaught SyntaxError: Unexpected token < - JavaScript - iDiallo
All it means is that the interpreter is expecting JavaScript or JSON and you are feeding it HTML/XML. If you don't think you...
Read more >How to Fix Uncaught SyntaxError: Unexpected token '{'
The JavaScript exceptions " unexpected token " occur when a specific language construct was expected, but something else was provided.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Glad you worked it out! Have a great weekend.
I’ll see if I can find some time over the weekend, but as I’m a volunteer here, my time is very short sorry @ghulamhussain.
There are some discussion on serving static content, such as this one: https://github.com/react-boilerplate/react-boilerplate/issues/984
Hopefully that helps.