-
Notifications
You must be signed in to change notification settings - Fork 53
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
Missing Cloudflare DB binding (D1) #331
Comments
Damn, seems related to wrangler. Could you try downgrading or upgrading the Wrangler version? |
So an update to this: it appears that it was not the wrangler version, I tried downgrading to multiple versions, but once I disabled inlineRouteRules, and removed the defineRouteRules from one of my pages (was only using it on one page), it started working again. (I was following this tutorial). |
Oh yes! I had the same error when using inlineRouteRules, will investigate thank you! |
@maxemiliang I opened a PR on "resolutions": {
"nitro-cloudflare-dev": "npm:@atinux/nitro-cloudflare-dev@0.2.1"
} Then |
Thank you, that fixed the problem! 🙏 Should I close the issue, or do you close it once the fix goes live? 🙂 |
I will close once |
Should be good now with https://github.com/nuxt-hub/core/releases/tag/v0.7.35 Make sure to remove the |
Thanks a lot for the help! 🙏 |
Describe the bug
When using the onHubReady() hook to run migrations using drizzle in development, the nitro server crashes with the following errors:
ERROR [nitro] [unhandledRejection] Missing Cloudflare DB binding (D1)
There is also a wrangler warning above the error:
The generated .data/hub/wrangler.toml file:
My package.json:
The "faulty" migration code (mostly a copy-paste from the drizzle recipes in the nuxt hub docs):
Steps to reproduce
Steps I have taken to attempt to resolve the issue:
nuxt cleanup
and deleted .data foldernpm run dev
(shamefully-hoist is also set to true in .npmrc)
The text was updated successfully, but these errors were encountered: