<p dir="auto">No compatible version found: babel-template@^6.24.1</p>
<p dir="auto">I'm trying to resolve by pinning versions with npm-shrinkwrap, but I'm very new to this.<br>
It seems that these libraries are suddenly incompatible with node 7.x</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
  &quot;dependencies&quot;: {
    &quot;babel-plugin-transform-es2015-duplicate-keys&quot;: {
      &quot;version&quot;: &quot;6.24.1&quot;,
      &quot;from&quot;: &quot;babel-plugin-transform-es2015-duplicate-keys@6.24.1&quot;,
      &quot;dependencies&quot;: {
        &quot;babel-types&quot;: {
          &quot;version&quot;: &quot;6.23.0&quot;,
          &quot;from&quot;: &quot;babel-types@6.23.0&quot;
        }
      }
    },
    &quot;babel-plugin-transform-es2015-modules-amd&quot;: {
      &quot;version&quot;: &quot;6.24.1&quot;,
      &quot;from&quot;: &quot;babel-plugin-transform-es2015-modules-amd@6.24.1&quot;,
      &quot;dependencies&quot;: {
        &quot;babel-plugin-transform-es2015-modules-commonjs&quot;: {
          &quot;version&quot;: &quot;6.23.0&quot;,
          &quot;from&quot;: &quot;babel-plugin-transform-es2015-modules-commonjs@6.23.0&quot;
        }
      }
    }
  }
}"><pre class="notranslate"><code class="notranslate">{
  "dependencies": {
    "babel-plugin-transform-es2015-duplicate-keys": {
      "version": "6.24.1",
      "from": "babel-plugin-transform-es2015-duplicate-keys@6.24.1",
      "dependencies": {
        "babel-types": {
          "version": "6.23.0",
          "from": "babel-types@6.23.0"
        }
      }
    },
    "babel-plugin-transform-es2015-modules-amd": {
      "version": "6.24.1",
      "from": "babel-plugin-transform-es2015-modules-amd@6.24.1",
      "dependencies": {
        "babel-plugin-transform-es2015-modules-commonjs": {
          "version": "6.23.0",
          "from": "babel-plugin-transform-es2015-modules-commonjs@6.23.0"
        }
      }
    }
  }
}
</code></pre></div>
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong></p>
<p dir="auto">Transpilation of the code fails with the following error.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: D:\Git\babel-duplicate-declaration-example\example.ts: Duplicate declaration &quot;foo&quot;
   6 |     }
   7 |     export namespace ns2 {
&gt;  8 |         export class foo {
     |                      ^
   9 |             F1: string;
  10 |         }
  11 |     }
    at File.buildCodeFrameError (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\core\lib\transformation\file\file.js:261:12)
    at Scope.checkBlockScopedCollisions (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\scope\index.js:344:22)
    at Scope.registerBinding (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\scope\index.js:501:16)
    at Scope.registerDeclaration (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\scope\index.js:444:12)
    at Object.BlockScoped (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\scope\index.js:187:28)
    at Object.newFn (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\visitors.js:230:17)
    at NodePath._call (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\path\context.js:53:20)
    at NodePath.call (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\path\context.js:36:14)
    at NodePath.visit (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\path\context.js:88:12)
    at TraversalContext.visitQueue (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\context.js:118:16)"><pre lang="log" class="notranslate"><code class="notranslate">TypeError: D:\Git\babel-duplicate-declaration-example\example.ts: Duplicate declaration "foo"
   6 |     }
   7 |     export namespace ns2 {
&gt;  8 |         export class foo {
     |                      ^
   9 |             F1: string;
  10 |         }
  11 |     }
    at File.buildCodeFrameError (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\core\lib\transformation\file\file.js:261:12)
    at Scope.checkBlockScopedCollisions (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\scope\index.js:344:22)
    at Scope.registerBinding (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\scope\index.js:501:16)
    at Scope.registerDeclaration (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\scope\index.js:444:12)
    at Object.BlockScoped (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\scope\index.js:187:28)
    at Object.newFn (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\visitors.js:230:17)
    at NodePath._call (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\path\context.js:53:20)
    at NodePath.call (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\path\context.js:36:14)
    at NodePath.visit (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\path\context.js:88:12)
    at TraversalContext.visitQueue (D:\Git\babel-duplicate-declaration-example\node_modules\@babel\traverse\lib\context.js:118:16)
</code></pre></div>
<p dir="auto"><strong>Input Code</strong></p>
<p dir="auto"><a href="https://github.com/ikenik/babel-duplicate-declaration-example">https://github.com/ikenik/babel-duplicate-declaration-example</a></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// typescript
module src {
    export namespace ns1 {
        export class foo {
            F1: string;
        }
    }
    export namespace ns2 {
        export class foo {
            F1: string;
        }
    }
}"><pre class="notranslate"><span class="pl-c">// typescript</span>
module <span class="pl-s1">src</span> <span class="pl-kos">{</span>
    <span class="pl-k">export</span> <span class="pl-k">namespace</span> <span class="pl-s1">ns1</span> <span class="pl-kos">{</span>
        <span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">foo</span> <span class="pl-kos">{</span>
            <span class="pl-c1">F1</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
        <span class="pl-kos">}</span>
    <span class="pl-kos">}</span>
    <span class="pl-k">export</span> <span class="pl-k">namespace</span> <span class="pl-s1">ns2</span> <span class="pl-kos">{</span>
        <span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">foo</span> <span class="pl-kos">{</span>
            <span class="pl-c1">F1</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
        <span class="pl-kos">}</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Expected behavior/code</strong><br>
A clear and concise description of what you expected to happen (or code).</p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
    presets: [&quot;@babel/preset-typescript&quot;]
}"><pre class="notranslate"><span class="pl-kos">{</span>
    <span class="pl-c1">presets</span>: <span class="pl-kos">[</span><span class="pl-s">"@babel/preset-typescript"</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;dependencies&quot;: {
    &quot;@babel/core&quot;: &quot;^7.4.5&quot;
  },
  &quot;devDependencies&quot;: {
    &quot;@babel/preset-typescript&quot;: &quot;^7.3.3&quot;
  }
}"><pre class="notranslate">{
  <span class="pl-ent">"dependencies"</span>: {
    <span class="pl-ent">"@babel/core"</span>: <span class="pl-s"><span class="pl-pds">"</span>^7.4.5<span class="pl-pds">"</span></span>
  },
  <span class="pl-ent">"devDependencies"</span>: {
    <span class="pl-ent">"@babel/preset-typescript"</span>: <span class="pl-s"><span class="pl-pds">"</span>^7.3.3<span class="pl-pds">"</span></span>
  }
}</pre></div>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="npm install
npm start"><pre class="notranslate">npm install
npm start</pre></div>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): v7.4.5</li>
<li>Node/npm version: Tested and confirmed in Node 8/9/10 with npm 5.6.0</li>
<li>OS: Windows 10</li>
<li>Monorepo: no</li>
<li>How you are using Babel: <code class="notranslate">cli</code></li>
</ul>
<p dir="auto"><strong>Additional context/Screenshots</strong></p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="354524188" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/8559" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/8559/hovercard" href="https://github.com/babel/babel/issues/8559">#8559</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="353773136" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/8525" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/8525/hovercard" href="https://github.com/babel/babel/issues/8525">#8525</a> may be related.</p>