<p dir="auto">I have the following code which runs fine by NodeJS (save in a file called error.js):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="'use strict';  
var arr = [];
function a (b, c)
{
   arr.push ({ e: &quot;RESERVED&quot;,
               arguments,
               c })
}
a(&quot;hi1&quot;, &quot;hi2&quot;)
a(&quot;hi3&quot;, &quot;hi4&quot;)
console.log(arr)

&lt;OUTPUT&gt;
[ { e: 'RESERVED',
    arguments: { '0': 'hi1', '1': 'hi2' },
    c: 'hi2' },
  { e: 'RESERVED',
    arguments: { '0': 'hi3', '1': 'hi4' },
    c: 'hi4' } ]"><pre class="notranslate"><code class="notranslate">'use strict';  
var arr = [];
function a (b, c)
{
   arr.push ({ e: "RESERVED",
               arguments,
               c })
}
a("hi1", "hi2")
a("hi3", "hi4")
console.log(arr)

&lt;OUTPUT&gt;
[ { e: 'RESERVED',
    arguments: { '0': 'hi1', '1': 'hi2' },
    c: 'hi2' },
  { e: 'RESERVED',
    arguments: { '0': 'hi3', '1': 'hi4' },
    c: 'hi4' } ]
</code></pre></div>
<p dir="auto">However, if I transform this with babel by using the code, I get an error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const babel = require('babel-core');
const fs = require('fs')
const code = fs.readFileSync('error.js', 'utf8');
babel.transform(code, {retainLines: true, presets: ['es2017', 'es2015']});


SyntaxError: unknown: arguments is a reserved word in strict mode (8:5)
   6 | {
   7 | 	arr.push ({	e: &quot;RESERVED&quot;, 
&gt;  8 | 					arguments,
     | 					^
   9 | 					c })
  10 | }"><pre class="notranslate"><code class="notranslate">const babel = require('babel-core');
const fs = require('fs')
const code = fs.readFileSync('error.js', 'utf8');
babel.transform(code, {retainLines: true, presets: ['es2017', 'es2015']});


SyntaxError: unknown: arguments is a reserved word in strict mode (8:5)
   6 | {
   7 | 	arr.push ({	e: "RESERVED", 
&gt;  8 | 					arguments,
     | 					^
   9 | 					c })
  10 | }
</code></pre></div>
<p dir="auto">I need to get babel to work on this kind of examples by tomorrow... Is there an easy way to make babel work?</p>
<blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Strate/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Strate">@Strate</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6</li>
<li><strong>Node version:</strong> 4</li>
<li><strong>npm version:</strong> 3</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="presets=['react','es2015']
plugins=['transform-runtime']"><pre class="notranslate"><code class="notranslate">presets=['react','es2015']
plugins=['transform-runtime']
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// file.js
export function some() {}

// module.js
export * from &quot;./file&quot;

// index.js
import * as Module from &quot;./module&quot;"><pre class="notranslate"><span class="pl-c">// file.js</span>
<span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">some</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>

<span class="pl-c">// module.js</span>
<span class="pl-k">export</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-s">"./file"</span>

<span class="pl-c">// index.js</span>
<span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-v">Module</span> <span class="pl-k">from</span> <span class="pl-s">"./module"</span></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">Babel compilation fails with</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Unexpected token
You may need an appropriate loader to handle this file type.
| &quot;use strict&quot;;
| 
| import _Object$defineProperty from &quot;babel-runtime/core-js/object/define-property&quot;;
| Object.defineProperty(exports, &quot;__esModule&quot;, {
|   value: true
 @ ./module.js 8:13-42"><pre class="notranslate"><code class="notranslate">Unexpected token
You may need an appropriate loader to handle this file type.
| "use strict";
| 
| import _Object$defineProperty from "babel-runtime/core-js/object/define-property";
| Object.defineProperty(exports, "__esModule", {
|   value: true
 @ ./module.js 8:13-42
</code></pre></div>
<p dir="auto">disabling <code class="notranslate">transform-runtime</code> plugins definetely fixes the problem</p>