0

I was installing node.js and, during the installation, was given the option to also install Chocolatey. The first issue was, it didn't install. The error will be attached below.

I then ran CMD as an administrator and wrote choco upgrade -y visualstudio2019-workload-vctools
This, also, did not solve the issue. I rather got the same error message, which is -

ERROR: Unable to detect any supported Visual Studio product. You may try passing --installPath or both --productId and --channelId parameters.

The upgrade of visualstudio2019-workload-vctools was NOT successful.

Error while running 'C:\ProgramData\chocolatey\lib\visualstudio2019-workload-vctools\tools\ChocolateyInstall.ps1'.

See log for details.

Chocolatey upgraded 0/1 packages. 1 packages failed.

See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

- visualstudio2019-workload-vctools (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\visualstudio2019-workload-vctools\tools\ChocolateyInstall.ps1'.

See log for details.

Attempts:

  • To install automatically, failed

  • To install by running CMD as an administrator and writing choco upgrade -y visualstudio2019-workload-vctools

  • Uninstalled node.js and repeated the first step.

Expectation:

  • To install Chocolatey, failed regardless.

1 Answers1

0

Don't install Chocolatey CLI using nodejs. Install Chocolatey CLI on it's own.

The other error you got tells you what the issue is:

ERROR: Unable to detect any supported Visual Studio product. You may try passing --installPath or both --productId and --channelId parameters.

It can't detect any supported Visual Studio product, so perhaps you don't have one installed?

pauby
  • 683
  • 3
  • 9
  • thanks for the input. However, it is important to note that, I do have Visual Studio Code and have been regularly using it, pushing commits and what not. But I still couldn't figure out CMD would say `ERROR: Unable to detect any supported Visual Studio product. You may try passing --installPath or both --productId and --channelId parameters.` – Shafin Mahmud Aug 21 '23 at 16:35