Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReactJS - Babel version problems

<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react-dom.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-router/1.0.0/ReactRouter.min.js"></script>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/6.1.19/browser.min.js"></script>-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<div id="container"></div>
    <script type="text/babel">
        ReactDOM.render(
            <h1>Hello, world!</h1>,
            document.getElementById('container')
        );
    </script>
</body>

babel 5.8.23 use script no error

but babel 6.1.19 use script error Uncaught TypeError: Cannot read property 'keys' of undefined

why error 6.1.19 yet upgrade

I know the cause

like image 943
user3648971 Avatar asked Nov 30 '15 07:11

user3648971


1 Answers

The babel-browser package has now been removed and new versions of it won't be released. There's no use case for it in Babel 6.

check this babel 6

like image 199
Dhaval Patel Avatar answered Sep 28 '22 01:09

Dhaval Patel