Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Run pre-deployment validation checks on Azure configuration, Bicep/Terraform, and permissions
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/recipes/azd/errors.md
1# AZD Validation Errors23## Pre-Deployment Errors45These errors can be caught **before** running `azd up`:67| Error | Cause | Resolution |8|-------|-------|------------|9| `Please run 'az login'` | Not authenticated | `az login` or `azd auth login` |10| `No environment selected` | Missing azd environment | `azd env select <name>` or `azd env new <name> --no-prompt` |11| `no default response for prompt 'Enter a unique environment name'` | No azd environment created, or missing `-e` flag | Run `azd env new <name> --no-prompt` OR use `azd init --from-code -e <name> --no-prompt` with the `-e` flag |12| `no default response for prompt 'Enter a value for the 'environmentName'` | Environment variables not set | Run `azd env set AZURE_ENV_NAME <name>` |13| `Service not found` | Service name mismatch | Check service name in azure.yaml |14| `Invalid azure.yaml` | YAML syntax error | Fix YAML syntax |15| `Project path does not exist` | Wrong service project path | Fix service project path in azure.yaml |16| `Cannot connect to Docker daemon` | Docker not running | Start Docker Desktop |17| `npm ci` fails with `missing: package-lock.json` | Dockerfile uses `npm ci` but `package-lock.json` not in build context | Run `npm install --package-lock-only` in the service directory before building |18| `Could not find a part of the path 'infra\main.bicep'` | Missing infrastructure files | Generate infra/ folder before `azd up` |19| `Invalid resource group location '<loc>'. The Resource group already exists in location '<other>'` | RG exists in different region | Check RG location first with `az group show`, use that region or new env name |20| `expecting only '1' resource tagged with 'azd-service-name: web', but found '2'` | Multiple resources with same tag **in the same RG** | Delete duplicate or rename service |2122## Static Web App Errors2324| Error | Cause | Fix |25|-------|-------|-----|26| `language 'html' is not supported` | Invalid language value | Omit `language` for pure static sites |27| `language 'static' is not supported` | Invalid language value | Omit `language` for pure static sites |28| `dist folder not found` | Wrong dist path or missing build | Check `dist` is relative to `project`; add `language: js` if build needed |29| `LocationNotAvailableForResourceType` | SWA not in region | See [Region Availability](../../region-availability.md) for valid regions |3031## SWA Path Validation3233Before deployment, verify:341. `project` path exists and contains source files352. For framework apps: `language: js` is set363. `dist` is relative to `project` (not project root)374. Bicep has `azd-service-name` tag matching service name3839## Debug4041```bash42azd <command> --debug43```44