static-web-apps-cli icon indicating copy to clipboard operation
static-web-apps-cli copied to clipboard

Version incompatibility for Azure Functions Core Tools blocks execution of `swa start`

Open stephlocke opened this issue 5 months ago • 4 comments

Are you accessing the CLI from the default port :4280 ?

  • [ ] No, I am using a different port number (--port) and accessing the CLI from that port
  • [x] Yes, I am accessing the CLI from port :4280

Describe the bug Working in ubuntu on the latest version of node and the swa cli, adding managed apis causes the cli to no longer work in terms of starting the app because of a version incompatability being registered between node and the azure functions core tools.

✖ Found Azure Functions Core Tools v4 which is incompatible with your current Node.js v24.5.0. ✖ See https://aka.ms/functions-node-versions for more information.

To Reproduce Steps to reproduce the behavior:

  1. Install node
> node --version
v24.5.0
  1. Install swa
> swa --version
2.0.6
  1. In an swa project, create a dotnet8 isolated function runtime (could work with others but this is what I used)
  2. Make sure to add your ap directory to your swa cli config
  3. Run swa start triggering core tools grab and then error due to version incompatability```

swa start ✖ Found Azure Functions Core Tools v4 which is incompatible with your current Node.js v24.5.0. ✖ See https://aka.ms/functions-node-versions for more information.



**Expected behavior**
`swa start` should work OR I should be able to disable parts of the project from being booted up to get around these sorts of errors.



**Desktop (please complete the following information):**

- Ubuntu 24.04

stephlocke avatar Aug 06 '25 16:08 stephlocke

PR #971 submitted as this errors only the swa cli side and has no upstream resolution requirements

stephlocke avatar Aug 07 '25 12:08 stephlocke

Hi @stephlocke, SWA haven't supported deploying node 24 APIs, see https://learn.microsoft.com/en-us/azure/static-web-apps/languages-runtimes. We recommand to temporarily apply this change to the local branch, if you want to execute "swa start" to run node 24 sites, Appoligize for the inconvenience.

cjk7989 avatar Aug 14 '25 08:08 cjk7989

@stephlocke I've the same problem and I switched to use node 22. Check this https://github.com/Azure/static-web-apps-cli/issues/791#issuecomment-2103232652

The cli seems to restricts itself to lts version

export function isCoreToolsVersionCompatible(coreToolsVersion, nodeVersion) {
    // Runtime support reference: https://docs.microsoft.com/azure/azure-functions/functions-versions?pivots=programming-language-javascript#languages
    switch (coreToolsVersion) {
        case 4:
            return nodeVersion >= 18 && nodeVersion <= 22;
        case 3:
            return nodeVersion >= 14 && nodeVersion <= 20;
        case 2:
            return nodeVersion >= 10 && nodeVersion <= 14;
        default:
            return false;
    }
}

unowiz avatar Aug 14 '25 19:08 unowiz

Bump: Node 24 is LTS and the PR has been sitting since August. Azure Functions have supported Node 24 LTS in Preview as well since Ignite. Any updates on 2.0.8?

https://github.com/Azure/azure-functions-nodejs-library/wiki/2025-Roadmap https://github.com/Azure/azure-functions-nodejs-library/issues/360

scottrudy avatar Nov 15 '25 16:11 scottrudy