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

An incorrect webpage is opened after debugging the "nextjs-basic-api" project #840

Open v-xinda opened 1 year ago

v-xinda commented 1 year ago

OS: Win10 Build Version: 20230618.1 Regression: Not a regression

Repro Steps:

  1. Open the nextjs-basic-api project in VS Code.
  2. Run npm install in TERMINAL window.
  3. Navigate to "Run and Debug" view -> Select "Azure Static Web Apps…" in the dropdown list -> Select "SWA: Run nextjs-basic-api" -> Debug.
  4. Check whether a correct webpage is opened.

Expect: A correct webpage is opened.

Actual: An incorrect webpage is opened. image

More Info:

  1. This issue also reproduces for the vue-basic-api, angular-basic-api, svelte-basic-api and angular-basic-dotnet projects.
  2. This issue doesn't reproduce for the ReactSite project.
  3. No webpage opens after debugging the angular-basic projects.
  4. After clicking "Check the proxy and the firewall" need to open the "Advanced settings" of the Chrome, but there is no "Advanced settings" for the Chrome 114.0.5735.134.
alexweininger commented 1 year ago

I believe this is being caused by https://github.com/Azure/static-web-apps-cli/issues/663. When using Node.js 18 the SWA CLI throws an error when trying to run swa start. Works fine in Node.js 16.

@v-xinda, what version of Node.js do you have installed?

v-xinda commented 1 year ago

@alexweininger Install Node.js on my machine. image