close

[Solved] ReactJS: “Uncaught SyntaxError: Unexpected token <”

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error ReactJS: “Uncaught SyntaxError: Unexpected token <” in javascript. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How ReactJS: “Uncaught SyntaxError: Unexpected token <” Error Occurs?

Today I get the following error ReactJS: “Uncaught SyntaxError: Unexpected token <” in javascript.

How To Solve ReactJS: “Uncaught SyntaxError: Unexpected token <” Error ?

  1. How To Solve ReactJS: “Uncaught SyntaxError: Unexpected token

    To Solve ReactJS: “Uncaught SyntaxError: Unexpected token Add type="text/babel" to the script that includes the .jsx file and add this: <script src="https://npmcdn.com/[email protected]/browser.min.js"></script>

  2. ReactJS: “Uncaught SyntaxError: Unexpected token

    To Solve ReactJS: “Uncaught SyntaxError: Unexpected token Add type="text/babel" to the script that includes the .jsx file and add this: <script src="https://npmcdn.com/[email protected]/browser.min.js"></script>

Solution 1

JSTransform is deprecated , please use babel instead.

<script type="text/babel" src="./lander.js"></script>

Solution 2

Add type="text/babel" to the script that includes the .jsx file and add this: <script src="https://npmcdn.com/[email protected]/browser.min.js"></script>

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment