Skip to content

Commit

Permalink
Warn that Hyperdrive bindings do not yet work in local dev
Browse files Browse the repository at this point in the history
Support is already in progress (see
cloudflare/workerd#1266) and should be coming in
the next few weeks, but we've already had at least one user get very
confused by this and cause us to spend time on debugging before
realizing the problem was that they were talking about problems in
wrangler dev rather than at the edge. This is an easy way to attempt to
mitigate that for now.
  • Loading branch information
a-robinson committed Oct 13, 2023
1 parent a08c292 commit 69339ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tall-dodos-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

Log a warning when using a Hyperdrive binding in local wrangler dev
6 changes: 6 additions & 0 deletions packages/wrangler/src/dev/dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,12 @@ function DevSession(props: DevSessionProps) {
);
}

if (props.local && props.bindings.hyperdrive?.length) {
logger.warn(
"Hyperdrive does not currently support 'wrangler dev' in local mode at this stage of the beta. Use the '--remote' flag to test a Hyperdrive configuration before deploying."
);
}

const announceAndOnReady: typeof props.onReady = (finalIp, finalPort) => {
if (process.send) {
process.send(
Expand Down

0 comments on commit 69339ab

Please sign in to comment.