简体   繁体   中英

Error in jsx file mapping : Unable to generate source map (ReactJS)

Getting error in browser (ReactJS):

<html>
<head>
<title>Hello React</title>
</head>
<body>
<h2 id="container"></h2>

<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<script src="~/Scripts/react/react-0.12.2.min.js"></script>
<script src="~/Scripts/react/JSXTransformer-0.12.2.js"></script>
<script src="@Url.Content("~/Scripts/jsx/HelloWorld.jsx")"></script>
</body>
</html>

I AM GETTING THE FOLLOWING ERROR: (inspect element > console)

GET http://localhost:1869/Scripts/jsx/HelloWorld.jsx?map=460A24595CF673D243983590694BCFEE 500 (Unable to generate source map)

How to solve ??? Help needed

I am assuming you are transforming JSX with JSXTransformer on the client-side since you are including the JSXTransformer script. In that case, JSX script tags need to have the attribute type="text/jsx" .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM