Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: Wrangler d1 execute errors when --file argument is passed #8020

Open
0xkake opened this issue Feb 3, 2025 · 1 comment
Open

🐛 BUG: Wrangler d1 execute errors when --file argument is passed #8020

0xkake opened this issue Feb 3, 2025 · 1 comment
Labels
awaiting reporter response Needs clarification or followup from OP bug Something that isn't working

Comments

@0xkake
Copy link

0xkake commented Feb 3, 2025

Which Cloudflare product(s) does this pertain to?

Wrangler, D1

What versions are you using?

3.107.2 [wrangler] 1.1.42 [bun]

What operating system and version are you using?

Mac Sequoia 15.1

Please provide a link to a minimal reproduction

No response

Describe the Bug

Wrangler d1 execute errors with the following message when --file is passed
✘ [ERROR] ReadableStream constructor takes an object as second argument, if any

When running with --local the command seems to freeze

Steps to reproduce

Initialise db (outputs should be pasted in wrangler.toml)

bun wrangler d1 create test-db

Create a test file with a simple sql command

echo "SELECT 1;" > ./test.sql

Run test command against db via --command and cat (works)

bun wrangler d1 execute test-db --local --command="$(cat test.sql)"

Run test command against db via --file (does not work)

bun wrangler d1 execute test-db --local --file=test.sql

Please provide any relevant error logs

⛅️ wrangler 3.107.2
--------------------

✔ ⚠️ This process may take some time, during which your D1 database will be unavailable to serve queries.
  Ok to proceed? … yes
🌀 Executing on remote database test-db ([redacted]):
🌀 To execute on your local development database, remove the --remote flag from your wrangler command.
Note: if the execution fails to complete, your DB will return to its original state and you can safely retry.
├ 🌀 Uploading [redacted].sql
│ 🌀 Uploading complete.
│

✘ [ERROR] ReadableStream constructor takes an object as second argument, if any

If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
@0xkake 0xkake added the bug Something that isn't working label Feb 3, 2025
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Feb 3, 2025
@emily-shen
Copy link
Contributor

Hey we don't support running wrangler with bun, as cloudflare workers uses theworkerd runtime. Do you have any issues if you run this with pnpm, npm or yarn?

@emily-shen emily-shen added the awaiting reporter response Needs clarification or followup from OP label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reporter response Needs clarification or followup from OP bug Something that isn't working
Projects
Status: Untriaged
Development

No branches or pull requests

2 participants