Tool pages / Wrangler
Cloudflare Wrangler 4.148.0: latest version, changes and gotchas
Latest: Wrangler 4.148.0, released (release notes).
The latest Cloudflare Wrangler is 4.148.0, published to npm on 2026-10-06 18:33 UTC. Upgrade inside your project with npm i -D wrangler@latest. Compared with 4.147.0 it adds four flags (wrangler dev --tunnel-allowed-mail, kv namespace create --experimental-mode, and two on queues subscription create), accepts assets.base_path, and fixes local R2 keys with spaces.
How do I install or upgrade to Wrangler 4.148.0?
In your project (Cloudflare's recommended install):
npm i -D wrangler@latest
npx wrangler --version # 4.148.0pnpm, yarn, bun:
pnpm add -D wrangler@latest
yarn add -D wrangler@latest
bun add -d wrangler@latestPin this exact version:
npm i -D wrangler@4.148.0Wrangler key facts
- Latest: wrangler 4.148.0, npm publish 2026-10-06 18:33 UTC (GitHub release
wrangler@4.148.0at 18:39 UTC in cloudflare/workers-sdk). - Wrangler shipped 25 releases in September 2026, from 4.128.0 to 4.145.0, and 3 more by 2026-10-06.
- Both 4.147.0 and 4.148.0 expose 430 help pages (commands and subcommands) in our sandbox; the diff between them touches 5 pages and adds 5 flags on 3 commands.
- The
legacy_envconfig field is an error since 4.111.0 (2026-07-15): service environments were removed and each environment deploys as<name>-<environment>. - In a non-interactive shell without
CLOUDFLARE_API_TOKEN,wrangler deployexits 1 and suggests--temporary(a temporary account, added in 4.101.0). - Release notes live in the cloudflare/workers-sdk monorepo, mixed with releases of miniflare, create-cloudflare and other packages.
What changed in the last 5 Wrangler releases?
Wrangler 4.148.0 (2026-10-06 18:33 UTC)
assets.base_pathserves an asset directory under a public URL prefix (for example/docs). (source)wrangler dev --tunnel-allowed-mailrequires email authentication on Quick Tunnels. (source)wrangler kv namespace create --experimental-mode instantcreates KV Instant namespaces (private beta). (source)wrangler queues subscription createadds--source-namespaceand--source-repo-name, required for--source artifacts.repo. (source)wrangler versions secret bulkdeletes a secret whose JSON value isnull. (source)- Local
r2 object putandr2 bulk putkeep keys with spaces, non-ASCII characters,#and%intact. (source) --temporaryaccount notices and the claim URL now go to stderr, not stdout; scripts that read the claim URL from stdout must read stderr. (source)
Wrangler 4.147.0 (2026-10-02 11:30 UTC)
Wrangler 4.146.0 (2026-10-01 16:34 UTC)
Wrangler 4.145.0 (2026-09-30 14:20 UTC)
Wrangler 4.144.0 (2026-09-29 21:12 UTC)
Which Wrangler commands and flags were added or removed?
Wrangler 4.147.0 → 4.148.0
0 commands added, 0 removed, 3 commands with flags added or removed; 5 help pages changed in any way.
Method: bin/tool-snapshot ran --help for every wrangler subcommand of both versions in a throwaway Linux sandbox (430 and 430 help pages), then bin/tool-diff compared them. Hidden flags do not appear in --help.
| Command | Flags added | Flags removed |
|---|---|---|
wrangler dev | --tunnel-allowed-mail | none |
wrangler kv namespace create | --experimental-mode | none |
wrangler queues subscription create | --source-namespace--source-repo-name | none |
- These are the last two minor versions. No command was added or removed;
kv namespace createalso gains the alias--x-mode, and thequeues subscription create --eventshelp now says to usepushed, notcf.artifacts.repo.pushed, forartifacts.repo.
What breaks when upgrading Wrangler, and how do I migrate?
| Version | Change | Migration |
|---|---|---|
| 4.148.0 | --temporary notices, the proof-of-work message and the claim URL moved from stdout to stderr. | Read the claim URL from stderr; stdout now carries only the command's own output (for example JSON from kv namespace list --temporary). |
| 4.131.0 | Removed the wrangler preview settings commands. | Check wrangler preview --help in your installed version for the current Preview commands. |
| 4.111.0 | Service environments, the legacy_env config field and the --legacy-env flag were removed; legacy_env in config is now an error. | Delete legacy_env from the config. With the old default (legacy_env = true) nothing changes; with legacy_env = false each environment now deploys as a standalone Worker <name>-<environment>. |
| 4.96.0 | Pipeline bindings: the pipeline field was renamed to stream. | Rename pipeline to stream in pipeline binding configuration. |
What Wrangler errors did we reproduce, and how do I fix them?
`wrangler deploy` in CI without an API token (Wrangler 4.148.0)
CI=1 npx wrangler deploy✘ [ERROR] In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN environment variable for wrangler to work. Please go to https://developers.cloudflare.com/fundamentals/api/get-started/create-token/ for instructions on how to create an api token, and assign its value to CLOUDFLARE_API_TOKEN.
To continue without logging in, rerun this command with `--temporary`. Wrangler will use a temporary account and print a claim URL.
# exit 1 (same text in 4.147.0)Fix: Set CLOUDFLARE_API_TOKEN in the CI secrets, as the error says. --temporary uses a temporary account, not yours. (source)
`legacy_env` in the config is an error (Wrangler 4.148.0)
npx wrangler deploy --dry-run -c legacy.jsonc # legacy.jsonc contains "legacy_env": false✘ [ERROR] Processing legacy.jsonc configuration:
- The "legacy_env" field is no longer supported, so please remove it from your configuration file.
Service environments have been removed, and each environment is now deployed as its own Worker named "<name>-<environment>". This matches the behaviour of "legacy_env = true", which was the default, so removing the field will not change how your Worker is deployed.
Refer to https://developers.cloudflare.com/workers/wrangler/environments/ for more information.
# exit 1Fix: Remove legacy_env. If it was false, expect each environment to deploy as its own Worker. (source)
`assets.base_path` is silently ignored before 4.148.0 (Wrangler 4.147.0)
npx wrangler@4.147.0 deploy --dry-run -c assets.jsonc # "assets": { "directory": "./public", "base_path": "/docs" }▲ [WARNING] Processing assets.jsonc configuration:
- Unexpected fields found in assets field: "base_path"
✨ Read 1 file from the assets directory /root/w-4.147.0/public
...
--dry-run: exiting now.
There is a newer version of Wrangler available (current: 4.147.0, latest: 4.148.0). Try upgrading, as it might support this configuration option.
# exit 0: the dry run passes and the field is droppedFix: Upgrade to 4.148.0 or later before relying on base_path; 4.148.0 accepts the same config without a warning. (source)
Local R2 object with a space in its key cannot be read back (Wrangler 4.147.0)
npx wrangler@4.147.0 r2 object put "test-bucket/my file.txt" --file hello.txt --local
npx wrangler@4.147.0 r2 object get "test-bucket/my file.txt" --local --pipeCreating object "my file.txt" in bucket "test-bucket".
Upload complete.
✘ [ERROR] The specified key does not exist.Fix: Upgrade to 4.148.0: the same two commands print the object (hello). Objects already stored by older versions stay under their percent-encoded keys. (source)
Wrangler release history by month
2026-10: 4.146.0 to 4.148.0 (3 releases to 2026-10-07)
- 4.148.0:
assets.base_path, email-protected Quick Tunnels, KV Instant namespaces, temporary-account notices on stderr. (source)
2026-09: 4.128.0 to 4.145.0 (25 releases)
2026-08: 4.119.0 to 4.127.1 (11 releases)
2026-07: 4.107.0 to 4.118.0 (13 releases)
2026-06: 4.95.0 to 4.106.0 (12 releases)
2026-05: 4.88.0 to 4.94.0 (10 releases)
Sources
- wrangler on the npm registry (versions and publish times) (read 2026-10-07)
- cloudflare/workers-sdk releases (GitHub API) (read 2026-10-07)
- wrangler@4.148.0 release notes (read 2026-10-07)
- wrangler@4.147.0 release notes (read 2026-10-07)
- wrangler@4.146.0 release notes (read 2026-10-07)
- wrangler@4.145.0 release notes (read 2026-10-07)
- wrangler@4.144.0 release notes (read 2026-10-07)
- PR #14620: remove service environments and legacy_env (read 2026-10-07)
- Cloudflare docs: Install/Update Wrangler (read 2026-10-07)
Last verified: 2026-10-07.