cloudflare / cloudflare/workers-sdk

[wrangler] wrangler types does not support --x-new-config

Open
#14,396 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.5k
Forks
1.5k
Avg merge
3d 8h
Merged PRs (30d)
186

Description

### What versions & operating system are you using?

System:
OS: Windows 11 10.0.26200
CPU: (16) x64 AMD Ryzen 7 7700 8-Core Processor
Memory: 9.65 GB / 31.11 GB
Binaries:
Node: 22.22.3 - C:\nvm4w\nodejs\node.EXE
npm: 11.17.0 - C:\Users\mynameistito\node_modules\.bin\npm.EXE
pnpm: 11.7.0 - C:\Users\mynameistito\.local\share\pnpm\bin\pnpm.CMD
bun: 1.3.14 - C:\Users\mynameistito\.bun\bin\bun.EXE
Deno: 2.8.3 - C:\Users\mynameistito\node_modules\.bin\deno.EXE
npmPackages:
@cloudflare/vitest-pool-workers: ^0.16.18 => 0.16.18
wrangler: ^4.103.0 => 4.103.0

### Please provide a link to a minimal reproduction

https://github.com/mynameistito/wrangler-types-new-config-repro

### Describe the Bug

`wrangler deploy --x-new-config --dry-run` and `wrangler build --x-new-config` both successfully load `cloudflare.config.ts`, but `wrangler types --x-new-config` rejects the same `new-config` flag.

This means a project using the experimental TypeScript config path still needs to keep `wrangler.jsonc` around just to generate Worker types. I expected `wrangler types --x-new-config` to generate types from `cloudflare.config.ts`, or at least for the new-config type-generation path to be available from the CLI consistently with `dev`, `build`, and `deploy`.

### Please provide any relevant error logs

```bash
$ bun wrangler types --x-new-config
✘ [ERROR] Unknown arguments: x-new-config, xNewConfig
```

```bash
$ bun wrangler types

⛅️ wrangler 4.103.0
────────────────────
✘ [ERROR] No config file detected. This command requires a Wrangler configuration file.

🪵 Logs were written to "C:\Users\mynameistito\.config\.wrangler\logs\wrangler-2026-06-23_10-33-41_078.log"
```

Contributor guide

Open the contributing guide

Research direction

Start by comparing how `wrangler types` handles arguments and configuration with `wrangler build` and `wrangler deploy`, using the linked reproduction to reproduce the failure. Done means `wrangler types --x-new-config` accepts the flag and generates Worker types from `cloudflare.config.ts`.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.