Unable to install forge@cli

Based on the error message, there are two main issues preventing the installation of @forge/cli:

  1. Visual Studio Build Tools are missing: The error indicates you need to install Visual Studio with “Desktop development with C++” workload. To fix this:

a) Install Visual Studio Build Tools:

  • Download the Visual Studio Build Tools installer from: Microsoft C++ Build Tools - Visual Studio
  • During installation, make sure to select “Desktop development with C++”
  • Alternatively, you can install the full Visual Studio Community Edition with the C++ workload
  1. There might be a proxy/SSL issue: The error message shows an SSL-related warning: “write EPROTO […] SSL routines:ssl3_get_record:wrong version number”

To resolve these issues, try the following steps:

  1. First, install the required build tools:
npm install --global --production windows-build-tools
  1. Then try installing @forge/cli again:
npm install -g @forge/cli

If you’re behind a corporate proxy, you might need to configure npm’s proxy settings:

npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080

Alternative Installation Method: If you continue to have issues, you can try:

  1. Clear npm cache:
npm cache clean --force
  1. Try installing with the --force flag:
npm install -g @forge/cli --force

If the problems persist after trying these solutions, you might want to:

  1. Check if your network/proxy settings are correct
  2. Ensure you have administrative privileges
  3. Try running the command prompt as administrator