Skip to content

Conversation

@southpolesteve
Copy link
Contributor

@southpolesteve southpolesteve commented Dec 19, 2025

Fixes #11709.

Previously, running wrangler d1 migrations apply, wrangler d1 migrations list, or wrangler d1 migrations create in a directory without a wrangler.toml or wrangler.json file would silently exit with no feedback, leaving users confused about what went wrong.

Now these commands display a clear error message:

"No configuration file found. Create a wrangler.toml or wrangler.json file to define your D1 database."

Written using OpenCode and Claude Opus 4.5

Prompt: "Can you solve this issue for me #11709"


  • Tests
    • Tests included/updated
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: This is a bug fix that adds an error message; no new features or API changes
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: Not a patch change to stable V3; this is a UX improvement for current version

@southpolesteve southpolesteve requested review from a team as code owners December 19, 2025 02:44
@changeset-bot
Copy link

changeset-bot bot commented Dec 19, 2025

🦋 Changeset detected

Latest commit: 7d64a96

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@claude
Copy link
Contributor

claude bot commented Dec 19, 2025

Claude finished @southpolesteve's task —— View job


Reviewing Changeset

  • Read changeset guidelines
  • Review changeset file
  • Validate and report findings

All changesets look good

The changeset .changeset/itchy-squids-design.md passes all validation checks:

  1. Version Type: ✅ Correctly uses patch for a bug fix (adding error messages)
  2. Changelog Quality: ✅ Has a clear title and detailed body explaining:
    • What the bug was (silent exit with no feedback)
    • Which commands are affected
    • What the new behavior is (clear error message with exact text)
  3. Markdown Headers: ✅ No h1/h2/h3 headers present
  4. Error Message Accuracy: ✅ The error message in the changeset matches the implementation exactly

The changeset accurately describes the change and provides good context for users reading the changelog.


@github-actions
Copy link
Contributor

Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the v3-maintenance branch with your changes. Thank you for helping us keep Wrangler v3 supported!

Depending on your changes, running git rebase --onto v3-maintenance main issue-11709 might be a good starting point.

Notes:

  • your PR branch should be named v3-backport-11711
  • add the skip-v3-pr label to the current PR to stop this workflow from failing

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 19, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@11711

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@11711

miniflare

npm i https://pkg.pr.new/miniflare@11711

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@11711

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@11711

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@11711

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@11711

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@11711

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@11711

wrangler

npm i https://pkg.pr.new/wrangler@11711

commit: 7d64a96

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Dec 19, 2025
@github-project-automation github-project-automation bot moved this from Approved to In Review in workers-sdk Dec 19, 2025
…ig file

Previously, running `wrangler d1 migrations apply`, `list`, or `create`
in a directory without a wrangler.toml or wrangler.json would silently
exit with no feedback. Now these commands display a clear error message
guiding users to create a configuration file.

Fixes #11709
…ig file

Previously, running `wrangler d1 migrations apply`, `list`, or `create`
in a directory without a Wrangler configuration file would silently
exit with no feedback. Now these commands display a clear error message
guiding users to create a configuration file.

Fixes #11709
@github-project-automation github-project-automation bot moved this from In Review to Approved in workers-sdk Dec 19, 2025
@southpolesteve southpolesteve merged commit 5121b23 into main Dec 19, 2025
35 checks passed
@southpolesteve southpolesteve deleted the issue-11709 branch December 19, 2025 16:44
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Dec 19, 2025
AmirSa12 pushed a commit to AmirSa12/workers-sdk that referenced this pull request Jan 5, 2026
…ig file (cloudflare#11711)

* fix(wrangler): show error when D1 migration commands run without config file

Previously, running `wrangler d1 migrations apply`, `list`, or `create`
in a directory without a wrangler.toml or wrangler.json would silently
exit with no feedback. Now these commands display a clear error message
guiding users to create a configuration file.

Fixes cloudflare#11709

* fix(wrangler): show error when D1 migration commands run without config file

Previously, running `wrangler d1 migrations apply`, `list`, or `create`
in a directory without a Wrangler configuration file would silently
exit with no feedback. Now these commands display a clear error message
guiding users to create a configuration file.

Fixes cloudflare#11709
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Wrangler d1 migrations apply in non-worker folder gives no feedback

4 participants