<p dir="auto">Heya,</p>
<p dir="auto">Currently, <code class="notranslate">@types/angular</code> has a dependency on an earlier version of itself as can be seen in <a href="https://npmcdn.com/@types/angular@1.5.5-alpha/package.json" rel="nofollow">https://npmcdn.com/@types/angular@1.5.5-alpha/package.json</a>.</p>
<p dir="auto">This cause a duplicate definition error when compiling a project that uses it:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kamik@T460p MINGW64 /D/sandbox/typescript-types-bug (master)
$ npm run tsc

&gt; typescript-types-bug@1.0.0 tsc D:\sandbox\typescript-types-bug
&gt; tsc

node_modules/@types/angular/index.d.ts(17,21): error TS2300: Duplicate identifier 'angular'.
node_modules/@types/angular/index.d.ts(18,21): error TS2300: Duplicate identifier 'ng'.
node_modules/@types/angular/node_modules/@types/angular/index.d.ts(17,21): error TS2300: Duplicate identifier 'angular'.
node_modules/@types/angular/node_modules/@types/angular/index.d.ts(18,21): error TS2300: Duplicate identifier 'ng'.

(...)
kamik@T460p MINGW64 /D/sandbox/typescript-types-bug (master)
$ npm ls
typescript-types-bug@1.0.0 D:\sandbox\typescript-types-bug
+-- @types/angular@1.5.5-alpha
| +-- UNMET DEPENDENCY @types/angular@1.5.4-alpha
| `-- @types/jquery@1.10.26-alpha
`-- typescript@2.0.0

npm ERR! missing: @types/angular@1.5.4-alpha, required by @types/angular@1.5.5-alpha"><pre class="notranslate"><code class="notranslate">kamik@T460p MINGW64 /D/sandbox/typescript-types-bug (master)
$ npm run tsc

&gt; typescript-types-bug@1.0.0 tsc D:\sandbox\typescript-types-bug
&gt; tsc

node_modules/@types/angular/index.d.ts(17,21): error TS2300: Duplicate identifier 'angular'.
node_modules/@types/angular/index.d.ts(18,21): error TS2300: Duplicate identifier 'ng'.
node_modules/@types/angular/node_modules/@types/angular/index.d.ts(17,21): error TS2300: Duplicate identifier 'angular'.
node_modules/@types/angular/node_modules/@types/angular/index.d.ts(18,21): error TS2300: Duplicate identifier 'ng'.

(...)
kamik@T460p MINGW64 /D/sandbox/typescript-types-bug (master)
$ npm ls
typescript-types-bug@1.0.0 D:\sandbox\typescript-types-bug
+-- @types/angular@1.5.5-alpha
| +-- UNMET DEPENDENCY @types/angular@1.5.4-alpha
| `-- @types/jquery@1.10.26-alpha
`-- typescript@2.0.0

npm ERR! missing: @types/angular@1.5.4-alpha, required by @types/angular@1.5.5-alpha
</code></pre></div>
<p dir="auto">I've tried looking at <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/angular">https://github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/angular</a> but there is no <code class="notranslate">package.json</code> there. Any way I can contribute a fix?</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/xxxx</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>.  (Please ask any appropriate questions there).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond.</li>
</ul>
<p dir="auto">Hi <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tkrotoff/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tkrotoff">@tkrotoff</a></p>
<h2 dir="auto">Problem:</h2>
<p dir="auto">After React 16 update many related typings just stopped working for anyone still on react 15. A similar error was reported before in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="248509895" data-permission-text="Title is private" data-url="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18708" data-hovercard-type="issue" data-hovercard-url="/DefinitelyTyped/DefinitelyTyped/issues/18708/hovercard" href="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18708">#18708</a> but never resolved and later closed because the person creating the issue updated to react 16 and stopped having the issue.</p>
<p dir="auto">This are the typings affected that I'm aware of:</p>
<ul dir="auto">
<li><code class="notranslate">@types/react-dom</code></li>
<li><code class="notranslate">@types/rc-slider</code></li>
<li><code class="notranslate">@types/react-addons-update</code></li>
<li><code class="notranslate">@types/react-addons-shallow-compare</code></li>
<li><code class="notranslate">@types/react-router</code></li>
</ul>
<p dir="auto">My investigation showed that types for <code class="notranslate">@types/react-select</code> and <code class="notranslate">@types/react-boostrap</code> work fine because although they also reference @types/react to the latest version they pick up the version installed in the project and don't come with their own node_modules folder that will try to use the latest version for react.</p>
<p dir="auto">Is there anything I can do in a PR to make these libraries work as react-select and react-bootstrap? I digging out the type definitions in here I can't figure out the difference, when do the type modules come with node_modules and when do they not? Can someone assist me in creating a PR to fix this ASAP?</p>
<p dir="auto">This is a total blocker for anyone still on React 15</p>