From 8b4f3f8d929aeb58df64a8fde70f2967e1a26a63 Mon Sep 17 00:00:00 2001 From: Geoff Rich <4992896+geoffrich@users.noreply.github.com> Date: Mon, 1 Jan 2024 11:44:32 -0800 Subject: [PATCH] docs: add engines documentation --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 310368d..4cd3883 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,16 @@ If you use a custom API directory (see [below](#apiDir)), your `api_location` wi If your `app_location` is in a subfolder (e.g. `./my_app_location`), then your `api_location` should include the path to that subfolder (e.g. `my_app_location/build/server`.) `output_location` should still be `build/static`. +### Building with the correct version of Node + +Oryx, Azure's build system, may attempt to build your application with an EOL version of Node that SvelteKit doesn't support. If you get an error like "Unsupported engine - Not compatible with your version of node/npm", you can force Oryx to use the correct version by setting an `engines` field in your app's `package.json`: + +```js +"engines": { + "node": ">=18.13 <19" +} +``` + ## Running locally with the Azure SWA CLI You can debug using the [Azure Static Web Apps CLI](https://github.com/Azure/static-web-apps-cli). Note that the CLI is currently in preview and you may encounter issues.