You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

启动Azure Static Web App报错:Functions Core Tools与Node.js版本兼容问题

问题描述

使用swa start启动带有API层的C# Blazor静态Web应用时,出现以下错误:

✖ 检测到Azure Functions Core Tools v4,与当前Node.js v20.12.2不兼容。
✖ 请查看相关文档了解更多信息。

当前已安装的版本信息:

  • Azure Functions Core Tools: 4.0.5441(64位),Commit hash: N/A
  • Function Runtime Version: 4.25.3.21264
    用户确认该版本组合理论上应与Node.js v20.12.2兼容。
解决方法
  • 更新Azure Functions Core Tools至最新稳定版
    旧版本的Core Tools可能存在Node.js版本检测逻辑错误,根据操作系统执行对应更新命令:

    • Windows(Chocolatey):choco upgrade azure-functions-core-tools
    • macOS(Homebrew):brew upgrade azure-functions-core-tools@4
    • Linux(Debian/Ubuntu):apt upgrade azure-functions-core-tools-4
  • 清除SWA CLI缓存
    缓存异常可能导致版本检测误判,执行命令:
    swa cache clean
    清理完成后重新运行swa start

  • 显式指定Functions运行时版本启动
    在启动命令中手动指定已安装的运行时版本,绕过自动检测逻辑:
    swa start --api-runtime-version 4.25.3.21264

  • 检查Node.js环境配置
    确认Node.js v20.12.2为LTS版本,若环境变量存在冲突,可尝试重新安装Node.js并确保其路径在系统环境变量中优先级最高。

内容的提问来源于stack exchange,提问作者DataWrangler1980

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.25 21:12:35