As a follow-up on the presentation I did at CloudBrew about Azure Static Web Apps I want to write a series of blog posts.
- Part I - Using the VS Code Extension
- Part II(this post) - Using the Astro Static Site Generator
Yesterday I showed you how to deploy your first Static Web App using the VSCode extension. As an example I used a static website created using Astro.
What I didn’t mention is that the first time the Github Actions workflow tried to build and deploy the application it failed with the following error message:
Build error:
Node.js v16.20.2 is not supported by Astro!
Please upgrade Node.js to a supported version: ">=18.14.1"
The problem is that the Github Action that is created by the extension assumes the use of node 14. As Astro requires a more recent Node.js version the Astro build fails. To resolve this we need to update our package.json
to explicitly specify a node version by adding an engines
section: