<p dir="auto">I get the following problem in <a href="https://travis-ci.org/LearningLocker/xapi-validation" rel="nofollow">a Travis build</a> with Typescript 2.2 using @types/lodash^4.14.45.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="node_modules/@types/lodash/index.d.ts(19449,15): error TS2428: All declarations of 'WeakMap' must have identical type parameters."><pre class="notranslate"><code class="notranslate">node_modules/@types/lodash/index.d.ts(19449,15): error TS2428: All declarations of 'WeakMap' must have identical type parameters.
</code></pre></div>
<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/lodash</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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"> 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"> <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.
<ul dir="auto">
<li>Authors: @....</li>
</ul>
</li>
</ul>
<p dir="auto">I found this problem compiling a project using Typescript version 2.2.0-dev.20170128 and @types/lodash version 4.14.51. In my case the tsconfig use es6 target. The error message is:</p>
<p dir="auto"><code class="notranslate">node_modules/@types/lodash/index.d.ts(19421,15): error TS2428: All declarations of 'WeakMap' must have identical type parameters. </code><br>
If I browse the file to the line indicated in the error message I can see the following comment:</p>
<p dir="auto"><code class="notranslate">// Backward compatibility with --target es5</code></p>
<p dir="auto">Maybe this is the cause of the issue?<br>
Best regards to all</p>