Reputation: 553
When I try swa start to fire up a new static web application created using "C#" Blazor with an API layer. The following error appears:
✖ Found Azure Functions Core Tools v4 which is incompatible with your current Node.js v20.12.2. ✖ See https://aka.ms/functions-node-versions for more information. PS D:\DEV\TedcoStaticWebAppV4> swa start
I have these versions installed, surely this core tools version and runtime is compatible with Node.js v20.12.2.
Azure Functions Core Tools Core Tools Version: 4.0.5441 Commit hash: N/A (64-bit) Function Runtime Version: 4.25.3.21264
Upvotes: 2
Views: 230
Reputation: 8400
Downgrade Node Version to 18.18.0, it worked for me.
I have created a Blazor App and able to run swa start
locally. Refer Article.
Node Version: 18.18.0
func version: 4.0.5611
I have used swa start
command in package.json
to run the project.
Package.json:
{
"name": "swa-local-first-demo",
"version": "1.0.0",
"description": "",
"scripts": {
"start": "swa start http://localhost:5092 --api-location http://localhost:7062"
},
"keywords": [],
"author": "",
"license": "ISC"
}
Console Output:
C:\Users\uname\Source\Repos\Solution1>npm start
> [email protected] start
> swa start http://localhost:5092 --api-location http://localhost:7062
Welcome to Azure Static Web Apps CLI (1.1.7)
***********************************************************************
* WARNING: This emulator may not match the cloud environment exactly. *
* Always deploy and test your app in Azure. *
***********************************************************************
[swa] - Waiting for http://localhost:5092 to be ready
[swa] √ http://localhost:5092 validated successfully
[swa] - Waiting for http://localhost:7062 to be ready
[swa] √ http://localhost:7062 validated successfully
[swa]
[swa] Using dev server for static content:
[swa] http://localhost:5092
[swa]
[swa] Using dev server for API:
[swa] http://localhost:7062
[swa]
[swa] Azure Static Web Apps emulator started at http://localhost:4280. Press CTRL+C to exit.
[swa]
[swa]
[swa] GET http://localhost:5092/ (proxy)
[swa] GET http://localhost:4280/ - 200
[swa] GET http://localhost:5092/css/app.css (proxy)
[swa] GET http://localhost:5092/_framework/blazor.webassembly.js (proxy)
[swa] GET http://localhost:5092/_framework/aspnetcore-browser-refresh.js (proxy)
[swa] GET http://localhost:4280/css/app.css - 200
[swa] GET http://localhost:4280/_framework/blazor.webassembly.js - 200
Output:
Upvotes: 0