Why I keep get error like unexpected token when follow React.js tutorial
<p><strong>[UPDATE]</strong>: It turns out that I did not follow exactly as official sites says, which means <strong>I need add "[  ]" in the command</strong>.</p>

<hr>

<p>All:</p>

<p>I am pretty new to react.js, when I follow <a href="https://facebook.github.io/react/docs/getting-started.html" rel="nofollow">official site tutorial</a>, the steps I used is:</p>

<p>A. Build a file main.js</p>

<p>B. npm install -g browserify</p>

<p>C. npm install --save react react-dom babelify babel-preset-react</p>

<p>D. browserify -t babelify --presets react main.js -o bundle.js</p>

<p><strong>Then I get error like</strong>:</p>

<pre><code>SyntaxError: c:/Temp/web/lnreact/main.js: Unexpected token (6:2)
  4 |
  5 | ReactDOM.render(
&gt; 6 |   &lt;h1&gt;Hello, world!&lt;/h1&gt;,
    |   ^
  7 |   document.getElementById('example')
  8 | );
    at Parser.pp.raise (c:\Temp\web\lnreact\node_modules\babelify\node_modules\babel-core\node_modul
es\babylon\index.js:1413:13)
    at Parser.pp.unexpected (c:\Temp\web\lnreact\node_modules\babelify\node_modules\babel-core\node_
modules\babylon\index.js:2895:8)
    at Parser.pp.parseExprAtom (c:\Temp\web\lnreact\node_modules\babelify\node_modules\babel-core\no
de_modules\babylon\index.js:746:12)
    at Parser.pp.parseExprSubscripts (c:\Temp\web\lnreact\node_modules\babelify\node_modules\babel-c
ore\node_modules\babylon\index.js:501:19)
    at Parser.pp.parseMaybeUnary (c:\Temp\web\lnreact\node_modules\babelify\node_modules\babel-core\
node_modules\babylon\index.js:481:19)
    at Parser.pp.parseExprOps (c:\Temp\web\lnreact\node_modules\babelify\node_modules\babel-core\nod
e_modules\babylon\index.js:412:19)
    at Parser.pp.parseMaybeConditional (c:\Temp\web\lnreact\node_modules\babelify\node_modules\babel
-core\node_modules\babylon\index.js:394:19)
    at Parser.pp.parseMaybeAssign (c:\Temp\web\lnreact\node_modules\babelify\node_modules\babel-core
\node_modules\babylon\index.js:357:19)
    at Parser.pp.parseExprListItem (c:\Temp\web\lnreact\node_modules\babelify\node_modules\babel-cor
e\node_modules\babylon\index.js:1224:16)
    at Parser.pp.parseCallExpressionArguments (c:\Temp\web\lnreact\node_modules\babelify\node_module
s\babel-core\node_modules\babylon\index.js:577:20)
</code></pre>

<p><strong>I am wondering where did I do wrong?</strong></p>

<p>Thanks</p>