<p dir="auto">Using Babel v6.0.2 with the following simple file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export function myfunc(first, second){
  return first * second;
}"><pre class="notranslate"><code class="notranslate">export function myfunc(first, second){
  return first * second;
}
</code></pre></div>
<p dir="auto">and a .babelrc with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
  &quot;plugins&quot;: [&quot;transform-es2015-modules-systemjs&quot;]
}"><pre class="notranslate"><code class="notranslate">{
  "plugins": ["transform-es2015-modules-systemjs"]
}
</code></pre></div>
<p dir="auto">fails with the error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: example.js: We found a path that isn't a NodePath instance"><pre class="notranslate"><code class="notranslate">Error: example.js: We found a path that isn't a NodePath instance
</code></pre></div>
<p dir="auto">For comparison, changing babelrc to use "transform-es2015-modules-commonjs" works correctly outputting  the expected transformation, so it looks like this is specific to the new systemjs transformer.</p>
<p dir="auto">--philip</p>
<p dir="auto">I have a problem when I use my globally-installed version of babel to compile a UMD module.<br>
Here's my package.json:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
    &quot;scripts&quot;: {
        &quot;build&quot;: &quot;babel src --out-dir dist&quot;,
        &quot;build-fail&quot;: &quot;~/.nvm/versions/node/v5.0.0/bin/babel src --out-dir dist&quot;
    },
    &quot;devDependencies&quot;: {
        &quot;babel-cli&quot;: &quot;6.0.2&quot;,
        &quot;babel-plugin-transform-es2015-modules-umd&quot;: &quot;6.0.2&quot;
    },
    &quot;babel&quot;: {
        &quot;plugins&quot;: [&quot;transform-es2015-modules-umd&quot;]
    }
}"><pre class="notranslate"><code class="notranslate">{
    "scripts": {
        "build": "babel src --out-dir dist",
        "build-fail": "~/.nvm/versions/node/v5.0.0/bin/babel src --out-dir dist"
    },
    "devDependencies": {
        "babel-cli": "6.0.2",
        "babel-plugin-transform-es2015-modules-umd": "6.0.2"
    },
    "babel": {
        "plugins": ["transform-es2015-modules-umd"]
    }
}
</code></pre></div>
<p dir="auto">My <code class="notranslate">src</code> consists of a single file <code class="notranslate">foo.js</code> with the content:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const x = 1"><pre class="notranslate"><code class="notranslate">const x = 1
</code></pre></div>
<p dir="auto">(The problem does not happen for a completely empty file.)</p>
<p dir="auto">When I run <code class="notranslate">npm run build-fail</code>, this happens:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; @ build-fail /home/andy/babel-bug
&gt; ~/.nvm/versions/node/v5.0.0/bin/babel src --out-dir dist

Error: src/foo.js: We found a path that isn't a NodePath instance
    at Function.get (/home/andy/babel-bug/node_modules/babel-traverse/lib/path/index.js:103:13)
    at TraversalContext.create (/home/andy/babel-bug/node_modules/babel-traverse/lib/context.js:73:30)
    at TraversalContext.visitMultiple (/home/andy/babel-bug/node_modules/babel-traverse/lib/context.js:102:25)
    at TraversalContext.visit (/home/andy/babel-bug/node_modules/babel-traverse/lib/context.js:193:19)
    at Function.traverse.node (/home/andy/babel-bug/node_modules/babel-traverse/lib/index.js:139:17)
    at NodePath.visit (/home/andy/babel-bug/node_modules/babel-traverse/lib/path/context.js:106:22)
    at TraversalContext.visitQueue (/home/andy/babel-bug/node_modules/babel-traverse/lib/context.js:151:16)
    at TraversalContext.visitQueue (/home/andy/babel-bug/node_modules/babel-traverse/lib/context.js:157:21)
    at TraversalContext.visitMultiple (/home/andy/babel-bug/node_modules/babel-traverse/lib/context.js:106:17)
    at TraversalContext.visit (/home/andy/babel-bug/node_modules/babel-traverse/lib/context.js:193:19)"><pre class="notranslate"><code class="notranslate">&gt; @ build-fail /home/andy/babel-bug
&gt; ~/.nvm/versions/node/v5.0.0/bin/babel src --out-dir dist

Error: src/foo.js: We found a path that isn't a NodePath instance
    at Function.get (/home/andy/babel-bug/node_modules/babel-traverse/lib/path/index.js:103:13)
    at TraversalContext.create (/home/andy/babel-bug/node_modules/babel-traverse/lib/context.js:73:30)
    at TraversalContext.visitMultiple (/home/andy/babel-bug/node_modules/babel-traverse/lib/context.js:102:25)
    at TraversalContext.visit (/home/andy/babel-bug/node_modules/babel-traverse/lib/context.js:193:19)
    at Function.traverse.node (/home/andy/babel-bug/node_modules/babel-traverse/lib/index.js:139:17)
    at NodePath.visit (/home/andy/babel-bug/node_modules/babel-traverse/lib/path/context.js:106:22)
    at TraversalContext.visitQueue (/home/andy/babel-bug/node_modules/babel-traverse/lib/context.js:151:16)
    at TraversalContext.visitQueue (/home/andy/babel-bug/node_modules/babel-traverse/lib/context.js:157:21)
    at TraversalContext.visitMultiple (/home/andy/babel-bug/node_modules/babel-traverse/lib/context.js:106:17)
    at TraversalContext.visit (/home/andy/babel-bug/node_modules/babel-traverse/lib/context.js:193:19)
</code></pre></div>
<p dir="auto">When I run <code class="notranslate">npm run build</code>, it works just fine.</p>
<p dir="auto">My <code class="notranslate">babel --version</code> is <code class="notranslate">6.0.2 (babel-core 6.0.2)</code> -- both globally and within my package. <code class="notranslate">which babel</code> is <code class="notranslate">/home/andy/.nvm/versions/node/v5.0.0/bin/babel</code>.</p>