title: Node.js Angular template - cannot find msbuild.exe
body: <p>I've bought a template from a theme website in Angular and I'm attempting to install it using <code>npm install</code> - but no matter what I try I'm running into the same error.</p>
  <pre class="lang-none prettyprint-override"><code>npm ERR! gyp verb found first Solution file build/binding.sln
  npm ERR! gyp verb could not find &quot;msbuild.exe&quot; in PATH - finding location in registry
  npm ERR! gyp info spawn C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe
  npm ERR! gyp info spawn args [
  npm ERR! gyp info spawn args   'build/binding.sln',
  npm ERR! gyp info spawn args   '/nologo',
  npm ERR! gyp info spawn args   '/p:Configuration=Release;Platform=x64'
  npm ERR! gyp info spawn args ]
  npm ERR! gyp ERR! build error
  npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
  npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:\Users\spike\Downloads\themeforest-VD5sqgks-flat-able-angular-4-admin-template\Template\skeleton\node_modules\node-gyp\lib\build.js:262:23)
  npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
  npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
  npm ERR! gyp ERR! System Windows_NT 10.0.22000
  npm ERR! gyp ERR! command &quot;C:\\Program Files\\nodejs\\node.exe&quot; &quot;C:\\Users\\spike\\Downloads\\themeforest-VD5sqgks-flat-able-angular-4-admin-template\\Template\\skeleton\\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;
  npm ERR! gyp ERR! cwd C:\Users\spike\Downloads\themeforest-VD5sqgks-flat-able-angular-4-admin-template\Template\skeleton\node_modules\node-sass
  npm ERR! gyp ERR! node -v v16.13.0
  npm ERR! gyp ERR! node-gyp -v v3.8.0
  npm ERR! gyp ERR! not ok
  npm ERR! Build failed with error code: 1
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\spike\AppData\Local\npm-cache\_logs\2022-07-31T15_31_41_537Z-debug.log
  </code></pre>
  <p>I've searched around SO and found the following question:
  <a href="https://stackoverflow.com/questions/28268630/node-gyp-cannot-find-msbuild-exe">Node-gyp cannot find msbuild.exe</a> - however nothing in this post fixed the error, I've tried all of these with no joy and I just can't get it to run.</p>
  <p>I use .NET regularly and have Visual Studio installed so I don't know if it's a version conflict or something? If so I really don't know how to resolve it, just thought it might be worth mentioning.</p>
  <p>Instructions that came with the template just said to run npm install with no further pre-requisites etc. and I'm really keen not be stuck with a template I can't run. It looks like other people have had success running it so it's definitely a problem relating to my machine. Just can't pinpoint what that is?</p>
  <p>I've since added the .NET framework to the PATH but still the same error:
  <a href="https://i.stack.imgur.com/bFqQo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bFqQo.png" alt="Path" /></a></p>