Apress / beginning-azure-static-web-apps

Source Code for "Beginning Azure Static Web Apps" by Stacy Cashmore
6 stars 5 forks source link

Running the Static Web App CLI (pg 112) #6

Open pmarangoni opened 4 days ago

pmarangoni commented 4 days ago

This isn't working as expected/described in the book.

Running swa start https://localhost:5000 gives me this result: `Welcome to Azure Static Web Apps CLI (2.0.1)


Using workflow file: G:\github\beginning-static-web-apps.github\workflows\azure-static-web-apps-brave-beach-0632ca71e.yml

Using dev server for static content: https://localhost:5000

Azure Static Web Apps emulator started at http://localhost:4280. Press CTRL+C to exit.`

When I open a new browser and navigate to http://localhost:4280/, the terminal window displays this: `GET https://localhost:5000/ (proxy)

G:\github\beginning-static-web-apps>`

And the application doesn't load in the browser.

Please advise.

pmarangoni commented 4 days ago

I see this notice here: https://learn.microsoft.com/en-us/azure/static-web-apps/static-web-apps-cli-install

Note

SWA CLI only supports Node versions 16 and below.

I then uninstalled Node (I had a more current version), and then installed an earlier version of Node (16.9.1) Now, when I run swa start https://localhost:5000 I get this:

Welcome to Azure Static Web Apps CLI (2.0.1)

✖ You are using Node 16.9.1 but this version of the CLI requires Node 18 or higher. ✖ Please upgrade your Node version.

WTF????