cloudflare / cloudflare/workers-sdk
🐛 BUG: wrangler caches account ID which causes auth 10000 error when moving accounts
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.5k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 186
Description
### Which Cloudflare product(s) does this pertain to?
Pages
### What versions are you using?
3.111.0
### What operating system and version are you using?
MacOS Sonoma 14.4.1
### Please provide a link to a minimal reproduction
_No response_
### Describe the Bug
Reproduction:
1. Create a pages project with wrangler under one CF account using an api token in env and deploy
2. Get a token for a different CF account and try to deploy the same project to that
You will get a 10000 error because under the hood Wrangler will try to deploy to the old account ID cached in `node_modules/.cache`, while showing the correct new account in the error output.
Deleting `node_modules` and running `npm install` fixes the issue.
I posted this as an [SO answer](https://stackoverflow.com/questions/65730051/how-to-fix-authentication-error-code-10000-in-cloudflare/79479889#79479889).
### Please provide any relevant error logs
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.