Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Comprehensive Cloudflare platform skill covering Workers, D1, R2, KV, AI, Durable Objects, and security.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/c3/gotchas.md
1# C3 Troubleshooting23## Deployment Issues45### Placeholder IDs67**Error:** "Invalid namespace ID"8**Fix:** Replace placeholders in wrangler.jsonc with real IDs:9```bash10npx wrangler kv namespace create MY_KV # Get real ID11```1213### Authentication1415**Error:** "Not authenticated"16**Fix:** `npx wrangler login` or set `CLOUDFLARE_API_TOKEN`1718### Name Conflict1920**Error:** "Worker already exists"21**Fix:** Change `name` in wrangler.jsonc2223## Platform Selection2425| Need | Platform |26|------|----------|27| Git integration, branch previews | `--platform=pages` |28| Durable Objects, D1, Queues | Workers (default) |2930Wrong platform? Recreate with correct `--platform` flag.3132## TypeScript Issues3334**"Cannot find name 'KVNamespace'"**35```bash36npm run cf-typegen # Regenerate types37# Restart TS server in editor38```3940**Missing types after config change:** Re-run `npm run cf-typegen`4142## Package Manager4344**Multiple lockfiles causing issues:**45```bash46rm pnpm-lock.yaml # If using npm47rm package-lock.json # If using pnpm48```4950## CI/CD5152**CI hangs on prompts:**53```bash54npm create cloudflare@latest my-app -- \55--type=hello-world --lang=ts --no-git --no-deploy56```5758**Auth in CI:**59```yaml60env:61CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}62CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}63```6465## Framework-Specific6667| Framework | Issue | Fix |68|-----------|-------|-----|69| Next.js | create-next-app failed | `npm cache clean --force`, retry |70| Astro | Adapter missing | Install `@astrojs/cloudflare` |71| Remix | Module errors | Update `@remix-run/cloudflare*` |7273## Compatibility Date7475**"Feature X requires compatibility_date >= ..."**76**Fix:** Update `compatibility_date` in wrangler.jsonc to today's date7778## Node.js Version7980**"Node.js version not supported"**81**Fix:** Install Node.js 18+ (`nvm install 20`)8283## Quick Reference8485| Error | Cause | Fix |86|-------|-------|-----|87| Invalid namespace ID | Placeholder binding | Create resource, update config |88| Not authenticated | No login | `npx wrangler login` |89| Cannot find KVNamespace | Missing types | `npm run cf-typegen` |90| Worker already exists | Name conflict | Change `name` |91| CI hangs | Missing flags | Add --type, --lang, --no-deploy |92| Template not found | Bad name | Check cloudflare/templates |93