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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 BUG: Cannot access D1 bindings if no_bundle is set #1954

Closed
sdnts opened this issue Sep 29, 2022 · 1 comment 路 Fixed by #1955
Closed

馃悰 BUG: Cannot access D1 bindings if no_bundle is set #1954

sdnts opened this issue Sep 29, 2022 · 1 comment 路 Fixed by #1955
Assignees
Labels
bug Something that isn't working

Comments

@sdnts
Copy link
Contributor

sdnts commented Sep 29, 2022

What version of Wrangler are you using?

2.1.9

What operating system are you using?

macOS

Describe the Bug

When I set no_bundle = true in my wrangler.toml, D1 bindings show up as undefined in my worker, at runtime (aka after wrangler publish), and during wrangler dev.

There's an internal thread on the D1 channel where Glen suggested this should work, so I thought I'd document this here.
I'm happy to delete/move this issue wherever y'all think is appropriate, since these are unsupported/beta features.

@sdnts sdnts added the bug Something that isn't working label Sep 29, 2022
@cameron-robey cameron-robey self-assigned this Sep 29, 2022
@cameron-robey
Copy link
Contributor

To clarify based on internal discussion:
You cannot use D1 bindings without running through wrangler's bundling. This means that the --no-bundle flag or no_bundle option wrangler.toml mean D1 will not work.

Temporary solution is to throw an error if D1 bindings are used with the no-bundle, which is implemented in #1955.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants