<blockquote>
<p dir="auto">Issue originally made by James Koshigoe (jameslk)</p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.6.5</li>
<li><strong>Node version:</strong> v4.2.1</li>
<li><strong>npm version:</strong> 2.14.7</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;babel-preset-es2015&quot;: &quot;^6.6.0&quot;

...

&quot;presets&quot;: [&quot;es2015&quot;]"><pre class="notranslate"><code class="notranslate">"babel-preset-es2015": "^6.6.0"

...

"presets": ["es2015"]
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export var i = 0;
i++;"><pre class="notranslate"><code class="notranslate">export var i = 0;
i++;
</code></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">When I try to run the following code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export var i = 0;
i++;"><pre class="notranslate"><code class="notranslate">export var i = 0;
i++;
</code></pre></div>
<p dir="auto">I see the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: test.js: undefined is not iterable!
    at TypeError (native)
    at module.exports.require.getIterator ([removed]/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-modules-commonjs/node_modules/babel-runtime/node_modules/core-js/library/modules/core.get-iterator.js:5:40)
    at Object.UpdateExpression ([removed]/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-modules-commonjs/lib/index.js:132:125)
    at NodePath._call ([removed]/.nvm/versions/node/v4.2.1/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:63:18)
    at NodePath.call ([removed]/.nvm/versions/node/v4.2.1/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:47:17)
    at NodePath.visit ([removed]/.nvm/versions/node/v4.2.1/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:93:12)
    at TraversalContext.visitQueue ([removed]/.nvm/versions/node/v4.2.1/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:152:16)
    at TraversalContext.visitSingle ([removed]/.nvm/versions/node/v4.2.1/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:115:19)
    at TraversalContext.visit ([removed]/.nvm/versions/node/v4.2.1/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:184:19)
    at Function.traverse.node ([removed]/.nvm/versions/node/v4.2.1/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/index.js:135:17)"><pre class="notranslate"><code class="notranslate">TypeError: test.js: undefined is not iterable!
    at TypeError (native)
    at module.exports.require.getIterator ([removed]/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-modules-commonjs/node_modules/babel-runtime/node_modules/core-js/library/modules/core.get-iterator.js:5:40)
    at Object.UpdateExpression ([removed]/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-modules-commonjs/lib/index.js:132:125)
    at NodePath._call ([removed]/.nvm/versions/node/v4.2.1/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:63:18)
    at NodePath.call ([removed]/.nvm/versions/node/v4.2.1/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:47:17)
    at NodePath.visit ([removed]/.nvm/versions/node/v4.2.1/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:93:12)
    at TraversalContext.visitQueue ([removed]/.nvm/versions/node/v4.2.1/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:152:16)
    at TraversalContext.visitSingle ([removed]/.nvm/versions/node/v4.2.1/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:115:19)
    at TraversalContext.visit ([removed]/.nvm/versions/node/v4.2.1/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:184:19)
    at Function.traverse.node ([removed]/.nvm/versions/node/v4.2.1/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/index.js:135:17)
</code></pre></div>
<blockquote>
<p dir="auto">Issue originally made by Justin Johansson (justinjohansson)</p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.11.4 (babel-core 6.13.2)</li>
<li><strong>Node version:</strong> v6.4.0</li>
<li><strong>npm version:</strong> v6.4.0</li>
</ul>
<h3 dir="auto">Input code</h3>
<p dir="auto">Bug shows up when transpiling following input code with ES2015 CommonJS module transform plugin.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/* file: bar.js */

export { yy, zz };

var yy = 0;
var zz = yy++;
"><pre class="notranslate"><code class="notranslate">/* file: bar.js */

export { yy, zz };

var yy = 0;
var zz = yy++;

</code></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">Bug is apparent by visual inspection of code in babel-plugin-transform-es2015-modules-commonjs/src/index.js line 122 in UpdateExpression:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="let newPaths = path.replaceWithMultiple(t.sequenceExpression(nodes));
for (const newPath of newPaths) this.requeueInParent(newPath);
"><pre class="notranslate"><code class="notranslate">let newPaths = path.replaceWithMultiple(t.sequenceExpression(nodes));
for (const newPath of newPaths) this.requeueInParent(newPath);

</code></pre></div>
<p dir="auto">replaceWithMultiple is a method which always returns undefined.  The following for/in statement will therefore always throw an exception as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="babel -d dist src
TypeError: src/bar.js: Cannot read property 'Symbol(Symbol.iterator)' of undefined
    at Object.UpdateExpression"><pre class="notranslate"><code class="notranslate">babel -d dist src
TypeError: src/bar.js: Cannot read property 'Symbol(Symbol.iterator)' of undefined
    at Object.UpdateExpression
</code></pre></div>