Closed arielelkin closed 8 years ago
Using Chrome v50.0.2661.102 (64-bit), I installed the server using npm.
npm
I'm on the first step of the tutorial, here's what I have:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>React Tutorial</title> <!-- Not present in the tutorial. Just for basic styling. --> <link rel="stylesheet" href="css/base.css" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.1/react.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.1/react-dom.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.16/browser.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/remarkable/1.6.2/remarkable.min.js"></script> </head> <body> <div id="content"></div> <script type="text/babel"> var CommentBox = React.createClass({ render: function() { return ( <div className="commentBox"> <h1>Comments</h1> <CommentList /> <CommentForm /> Hello, world! I am a CommentBox. </div> ); } }); ReactDOM.render( <CommentBox /> document.getElementById('content') ); </script> </body> </html>
This produces the following error in the console:
browser.js:2027 Uncaught SyntaxError: embedded: Unexpected token (19:8)pp.raise @ browser.js:2027pp.unexpected @ browser.js:2596pp.expect @ browser.js:2590pp.parseExprList @ browser.js:1627pp.parseSubscripts @ browser.js:1124pp.parseSubscripts @ browser.js:1113pp.parseExprSubscripts @ browser.js:1099pp.parseMaybeUnary @ browser.js:1079pp.parseExprOps @ browser.js:1035pp.parseMaybeConditional @ browser.js:1018pp.parseMaybeAssign @ browser.js:986pp.parseExpression @ browser.js:961pp.parseStatement @ browser.js:2822(anonymous function) @ browser.js:657pp.parseTopLevel @ browser.js:2723parse @ browser.js:1921exports.default @ browser.js:8217parse @ browser.js:9097parseCode @ browser.js:9182(anonymous function) @ browser.js:13132wrap @ browser.js:9146transform @ browser.js:13130transform.run @ browser.js:4613exec @ browser.js:4649runScripts @ browser.js:4680
missing comma after <CommentBox /> !
<CommentBox />
Using Chrome v50.0.2661.102 (64-bit), I installed the server using
npm
.I'm on the first step of the tutorial, here's what I have:
This produces the following error in the console: