title: Azure DevOps Build pipeline `npm install` failing on node-gyp
body: <p>We have a CD/CI Azure Devops build pipeline that has started failing for <code>nodejs/node-gyp</code>.</p>
  <ul>
  <li><code>error gyp info using node-gyp@3.8.0</code></li>
  <li><code>error gyp info using node@16.13.0 | win32 | x64</code></li>
  </ul>
  <p>Nothing about our build pipeline has changed, the pool we use is:</p>
  <pre><code>pool:
    vmImage: 'windows-latest'
  </code></pre>
  <p>Which is still mapped to <code>windows-2019</code> <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&amp;tabs=yaml" rel="noreferrer">https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&amp;tabs=yaml</a>.</p>
  <p>The pipeline fails when we hit the following task in the YAML file:</p>
  <pre><code>- task: Npm@1
    displayName: 'npm install'
    inputs:
      command: 'install'
      workingDir: 'FrontEnd'
      verbose: true
  </code></pre>
  <p>Log file:</p>
  <pre><code>error gyp ERR! UNCAUGHT EXCEPTION
  error gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\15.0\Bin\MSBuild.exe ENOENT
  error gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
  error gyp ERR! stack     at onErrorNT (node:internal/child_process:477:16)
  error gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
  error gyp ERR! System Windows_NT 10.0.17763
  error gyp ERR! command &quot;C:\\Program Files\\nodejs\\node.exe&quot; &quot;D:\\a\\1\\s\\Presentation\\node_modules\\node-gyp\\bin\\node-gyp.js&quot; &quot;rebuild&quot; &quot;--verbose&quot; &quot;--libsass_ext=&quot; &quot;--libsass_cflags=&quot; &quot;--libsass_ldflags=&quot; &quot;--libsass_library=&quot;
  error gyp ERR! cwd D:\a\1\s\FrontEnd\node_modules\node-sass
  error gyp ERR! node -v v16.13.0
  error gyp ERR! node-gyp -v v3.8.0
  error gyp ERR! This is a bug in `node-gyp`.
  error gyp ERR! Try to update node-gyp and file an Issue if it does not help:
  error gyp ERR!     &lt;https://github.com/nodejs/node-gyp/issues&gt;
  error Build failed with error code: 7
  verbose exit 1
  
  ##[error]Error: Npm failed with return code: 1
  </code></pre>