Skip to content

TS Apphost .addParameter() throws Capability 'Aspire.Hosting/addParameter' requires handle of type 'unknown', got 'unknown' #17606

@chrisusher-tt

Description

@chrisusher-tt

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I'm not able to run aspire start if I try and add a Parameter for TS Apphosts.

Expected Behavior

Should be able to use const endpoint = await builder.addParameter("registry-endpoint"); per the docs in the TS Apphost.

Steps To Reproduce

On 13.5.0-preview.1.26277.22+9a9ddbbf2d4a36b9a2af1e13cba8ed8cd29bc6d6

Create a new Apphost, in my case I want to use an existing Cosmos Account and provide values of this account via params

const cosmosName = await builder.addParameter("COSMOS_NAME");
const cosmosResourceGroup = await builder.addParameter("COSMOS_RESOURCE_GROUP");

const cosmosdb = await builder
  .addAzureCosmosDB("cosmos-db")
  .asExisting(cosmosName, {
    resourceGroup: cosmosResourceGroup,
  });


### Exceptions (if any)

[2026-05-28 17:02:37.615] [FAIL] [DetachedAppHost/AppHost] ❌ Capability Error: Capability 'Aspire.Hosting/addParameter' requires handle of type 'unknown', got 'unknown'
[2026-05-28 17:02:37.615] [FAIL] [DetachedAppHost/AppHost]    Code: TYPE_MISMATCH
[2026-05-28 17:02:37.615] [FAIL] [DetachedAppHost/AppHost]    Capability: Aspire.Hosting/addParameter
[2026-05-28 17:02:37.615] [FAIL] [DetachedAppHost/GuestAppHostProject] TypeScript (Node.js) apphost exited with code 1

### Aspire doctor output

Aspire Environment Check
========================

Aspire
  ✅ Aspire CLI version 13.5.0-preview.1.26277.22 (channel: daily)  

AppHost
  ✅ AppHost version 13.5.0-preview.1.26277.21 (channel: daily) (apphost.ts)  

Container Runtime
  ✅ Docker v29.2.0: running (auto-detected (default)) ← active  

Environment
  ✅ TypeScript AppHost tooling found (pnpm).  
  ✅ HTTPS development certificate is trusted  

Summary: 5 passed, 0 warnings, 0 failed

### Anything else?

I'm on Node 22 on Windows 11 Pro

Metadata

Metadata

Labels

area-polyglotIssues related to polyglot apphoststriage:bot-seenAspire triage bot has seen this issue

Type

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions