title: React - Module parse failed: Unexpected token
body: <p>I decided to install the npm package <a href="https://www.npmjs.com/package/react-radio-buttons" rel="nofollow noreferrer">react-radio-buttons</a> after installing and applying on my component gives an error:</p>
  <blockquote>
  <pre class="lang-none prettyprint-override"><code>./node_modules/react-radio-buttons/index.jsx 80:6
  module parse failed: Unexpected token (80:6)
  You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
  |     const style = horizontal ? { display: 'inline-flex', width: '100%' } : {};
  |     return (
  &gt;       &lt;div style={style} { ...props}&gt;
  |         {
  |           children.map((c, i) =&gt; this.renderChild(c, i, i === checkedIndex)))
  </code></pre>
  </blockquote>
  <p>I suppose the problem may be related to <code>package.json</code> but I don't know how to solve the problem. Before I provide the package file, I want to warn a lot of properties inside the <code>dependencies</code> object, I will cut everything out and leave only <code>&quot;react-radio-buttons&quot;: &quot;^ 1.2.2&quot;,</code> the actual package behind which the error occurs.</p>
  <p><strong>package.json</strong></p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;name&quot;: &quot;my-app&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;react-radio-buttons&quot;: &quot;^1.2.2&quot;,
    },
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;react-scripts start&quot;,
      &quot;build&quot;: &quot;react-scripts build&quot;,
      &quot;test&quot;: &quot;react-scripts test&quot;,
      &quot;eject&quot;: &quot;react-scripts eject&quot;
    },
    &quot;eslintConfig&quot;: {
      &quot;extends&quot;: &quot;react-app&quot;
    },
    &quot;browserslist&quot;: {
      &quot;production&quot;: [
        &quot;&gt;0.2%&quot;,
        &quot;not dead&quot;,
        &quot;not op_mini all&quot;
      ],
      &quot;development&quot;: [
        &quot;last 1 chrome version&quot;,
        &quot;last 1 firefox version&quot;,
        &quot;last 1 safari version&quot;
      ]
    }
  }
  </code></pre>