title: How to npm i ssh2 without errors on Windows?
body: <p><code>npm i ssh2</code> ends with:</p>
  <blockquote>
  <p>MSVCRT.lib(chandler4gs.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function
  __except_handler4 [c:\xxxxxxx\git\sdk\v2\master\node_modules\yyyy\node_modules\cpu-features\build\cpufeatures.
  vcxproj]
  c:\xxxxxxx\git\sdk\v2\master\node_modules\yyyy\node_modules\cpu-features\build\Release\cpufeatures.node : fatal
  error LNK1120: 1 unresolved externals [c:\SAPDevelop\git\sdk\v2\master\node_modules\irpa_core\node_modules\cpu-feature
  s\build\cpufeatures.vcxproj]</p>
  </blockquote>
  <p>As you can see, the problem is in <code>cpu-features</code>. I was able to look at the <code>cpu-features</code> build files for MS Visual Studio (by running <code>npm i cpu-features</code>) and I <em>think</em> I found the root cause:
  the node module (cpufeatures.node) is compiled with the <code>/MT</code> option (the C/C++ Run Time is to be statically linked)
  But the DLL is linked to <code>cpu_features.lib</code>, witch is itself built with a link to <code>utils.lib</code>...
  The two libraries, <code>cpu_features.lib</code> and <code>utils.lib</code> are compiled with the <code>/MD</code> switch (C/C++ Run Time is to be dynamicaly linked)</p>
  <p>That's not correct. On Windows with Visual Studio, all libs linked to a DLL must use the same option with respect to link to the C/C++ Run Time. The DLL <code>cpufeatures.node</code> <strong>build fine</strong> after MANUALLY changing <code>/MD</code> to <code>/MT</code> in the Visual Studio projects for the two libraries.</p>
  <p>I know nothing about <code>cmake</code>.</p>
  <p>Question: how to successfully <code>npm install ssh2</code> <em>on Windows</em>?</p>
  <p>(I created an issue here: <a href="https://github.com/mscdex/cpu-features/issues/3" rel="nofollow noreferrer">https://github.com/mscdex/cpu-features/issues/3</a> with no avail so far. I understand that cpu-features is <em>optional</em> for ssh2. Alternative question: how to tell <code>npm install ssh2</code> to not try to build cpu-features?)</p>
  <pre><code> Windows 10 Enterprise 64 bits 21H1 build 19043.1237
   node v14.17.6
   npm 6.14.15
   node-gyp 8.2.0
   cmake 3.21.3
   Visual Studio Enterprise 2019 Version 16.11.3
  </code></pre>