I don't think it was the blog one, but the other one that they recommend with some starter files. I
I don't think it was the blog one, but the other one that they recommend with some starter files. I didn't change anything
16 Replies
Ah yep it’s broken - thanks for the report, I’ll go have a look 🫠
Does anyone have best practices for handling wrangler.toml files in a monorepo? We have them all over, and with apps/packages/workers all needing them to some extent, it can get pretty confusing to make sure we have the right bindings in the right places without massive duplication everywhere.
AiError
Hey folks, I had a pretty rough dev experience with using durable objects, and it would be nice to get some guidance on best practices.
In a dev branch, i set up my Toml file to have a durable object binding without an env (as per docs), but it looked like when i ran wrangler dev —remote, it created a durable object in prod.
That caused a lot of problems, and a separate branch that wasn’t related was unable to deploy bc it didn’t have the migration to delete the durable object.
Also, it looked like deploying to remote dev would update the durable object in prod.
As an example, I don’t really have a good idea of the dev lifecycle. Like if I create a DO for the first time, what should my toml file look like to test & deploy? And after several iterations, what would it look like (e.g. do I need to delete migrations after every deploy?)
Migrations are only for if you create a new class, rename a class, or delete a class. They don't need to be added for each deploy
thanks for responding.
is it expected that doing dev —remote would deploy a production asset?
My unrelated branch was failing to deploy because the toml file didn’t have a reference to a durable object that was only defined in a test branch. I can’t remember the exact error, but I had to add a migration in my unrelated branch to delete the existing durable object and then in a follow up, I needed to remove the migration because now there was no durable object to delete.
It was a headache because I didn’t even deploy the durable object intentionally
Maybe? I don't know the particulars for DOs specifically, but
--remote
mode is kind of weird because it has to interact with prod services for stuff like R2
I would go local, if possible, to minimize issues like thatok, in general, do you know if you have to clean up the migrations in the toml files?
Even if i developed locally, it seems like there’s a step where you need to remove migrations after classes are deleted etc, and that seems annoying if you have version control and work with multiple people
How to solve this issue, when using a custom port with HTTPS
known issue with fetch() requests to custom HTTPS ports in published Workers: the custom port will be ignored when the Worker is published using the "wrangler deploy" command.
Anyone knows how to login to wrangler in project IDX?
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
Has been stuck on
Waiting for DNS to propagate (36s) ...
for like 15 min now, even though I can access the deployment already. Any idea what could the cause be?
Welp, I ctrl + c it, changed some stuff and run npm run deploy
- now it worked fine ¯\_(ツ)_/¯hello, can i load the code deployed from the worker dashboard in wrangler?
https://github.com/cloudflare/workers-sdk/pull/7031/#issuecomment-2432587096
how do I build something like this on my local?
I’d start in the contributing guide: https://github.com/cloudflare/workers-sdk/blob/main/CONTRIBUTING.md
somehow, it's not beginner friendly enough, and I had to use private NPM registry to test the package I edit