microsoft / vscode-azurestaticwebapps

Azure Static Web Apps extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurestaticwebapps
MIT License
90 stars 35 forks source link

Fail to execute the command "Azure Static Web Apps: Install or Update Azure Static Web Apps CLI" on Mac & Linux #782

Closed v-ruizh closed 1 year ago

v-ruizh commented 1 year ago

OS: M1/Linux Build Version: 20230119.3 Regression: Not a regression

Repro Steps:

  1. F1 -> Azure Static Web Apps: Install or Update Azure Static Web Apps CLI.
  2. Check whether succeeds to execute the command.

Expect: Succeed to execute the command.

Actual: Fail to execute the command. image image

More Info:

  1. This issue does not reproduce on Windows.
  2. Succeed to install the Azure Static Web Apps CLI with the same command which add "sudo" manually.
  3. This issue also reproduces when executing command "Azure Static Web Apps: Uninstall Azure Static Web Apps CLI".
MicroFish91 commented 1 year ago

Good suggestion, but I think the error is pretty clear about needing to rerun the command with 'sudo' and this error only occurs when npm isn't installed in the correct directory for privilege purposes.