2

Using IntelliJ Idea and Created an index.htm file

I am just trying to include the below links and run the code on server end
Nothing is getting rendered on the screen :

<html >
<head>
    <script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
    <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>

    <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>

    <title>Live Link</title>
</head>
<body>

    <div id="Output"></div>

    <script type="text/babel">
        ReactDOM.render(<h1>Hello Human</h1>, window.document.getElementById('Output'));
    </script>
</body>
</html>

This older versions link work, but new version links are not working.

https://stackoverflow.com/a/33963992/5078763

Getting below Error in Console.log:

    babel.min.js:5 Uncaught SyntaxError: Invalid regular expression: Range out of order in character class
    at new RegExp (<anonymous>)
    at Object.<anonymous> (babel.min.js:5)
    at t (babel.min.js:1)
    at Object.t.__esModule (babel.min.js:19)
    at t (babel.min.js:1)
    at Object.<anonymous> (babel.min.js:2)
    at t (babel.min.js:1)
    at Object.e.exports (babel.min.js:1)
    at t (babel.min.js:1)
    at Object.e.exports.version (babel.min.js:1)
(anonymous) @ babel.min.js:5
t @ babel.min.js:1
t.__esModule @ babel.min.js:19
t @ babel.min.js:1
(anonymous) @ babel.min.js:2
t @ babel.min.js:1
e.exports @ babel.min.js:1
t @ babel.min.js:1
e.exports.version @ babel.min.js:1
t @ babel.min.js:1
t.__esModule @ babel.min.js:16
t @ babel.min.js:1
t.__esModule @ babel.min.js:11
t @ babel.min.js:1
(anonymous) @ babel.min.js:2
t.__esModule @ babel.min.js:2
t @ babel.min.js:1
t.__esModule @ babel.min.js:10
t @ babel.min.js:1
t.__esModule @ babel.min.js:14
t @ babel.min.js:1
t.__esModule @ babel.min.js:1
t @ babel.min.js:1
(anonymous) @ babel.min.js:1
(anonymous) @ babel.min.js:1
(anonymous) @ babel.min.js:1
(anonymous) @ babel.min.js:1
raven.min.js:2 <img>​
2
  • 1
    Nothing is getting rendered on the screen - I see Hello Human - have you done debugging 101 - checked the browsers developer tools console for errors Commented Nov 2, 2017 at 22:36
  • I have added the Error Log I got Commented Nov 2, 2017 at 22:48

1 Answer 1

5

The minified babel.min.js contains utf-8 encoded strings. You can make your example work by putting a <meta charset="utf-8"> inside your <head>.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.