bateswebtech
CDCloudflare Developers
•Created by bateswebtech on 10/22/2024 in #workers-help
Worker CLI deployment error
Hi, I was wondering if someone could assist me? I'm getting this error when deploying from the CLI.
binding DB of type d1 failed to generate. Please try again later or contact support. [code: 10021]
4 replies
CDCloudflare Developers
•Created by bateswebtech on 10/7/2024 in #pages-help
Getting a 500 internal server error
Today, we deployed new code and encountered a 500 error upon viewing the site. Even after reverting the commits, the error persisted following deployment. Ultimately, manually rolling back the deployment to an older commit from the pages dashboard brought the site back up, but as of now we are not able to push new code out.
8 replies
CDCloudflare Developers
•Created by bateswebtech on 8/16/2023 in #workers-help
[Question] Is there a better way to run multiple workers with service bindings?
I am working on an app with around 10 workers all connected through service bindings with one acting as a "gateway".
We used to use Miniflare 2 which allowed them to be sort of nested and we could run just the gateway which would automatically bind all the services. However, now that we have migrated to wrangler 3 we have to run each service individually and it's kind of a pain and a little bit chaotic.
I'm currently using this package to run all of them at once https://github.com/mysticatea/npm-run-all
I noticed in the docs for service bindings, they say that you should run each one separately. Just wanted to ask if anyone from the community has a similar use-case and other ways of doing this?
1 replies
CDCloudflare Developers
•Created by bateswebtech on 8/16/2023 in #workers-help
[ERROR] Could not resolve "node:buffer"
Hello, I'm having some issues with building my worker using:
I'm using a PNPM monorepo and the import i'm using is as follows:
I have everything running and working in dev mode, however when I go to build the worker I get the following error:
here is my build.js file with esbuild
4 replies
CDCloudflare Developers
•Created by bateswebtech on 6/23/2023 in #workers-help
Is it possible to share env variables among workers?
I have quite a few workers connected via service bindings and some of them have some env vars in common. I guess what i'm looking for would be like global variables accessible to all workers published on the account.
1 replies
CDCloudflare Developers
•Created by bateswebtech on 6/10/2023 in #workers-help
Deployment error when using [placement] mode="smart"
Hello!
I am attempting to deploy a worker that has a D1 database, and a Service binding. In my wrangler.toml config I have put it into the placement smart mode.
[placement]
mode="smart"
I am getting an error which looks like my account has triggers and placement configured.
error: workers.api.error.placement_and_triggers_configured [code: 100150]
I have confirmed that I do not in fact have any triggers configured on the worker so I think this might be a bug.
It seems like this user had a similar issue https://discord.com/channels/595317990191398933/1111627637912244254/1111750799266164868 but it looks like it was (potentially) resolved. @mhart
Any help would be much appreciated!
11 replies
CDCloudflare Developers
•Created by bateswebtech on 4/10/2023 in #workers-help
Trying to make a simple cache using a cloudflare worker with hono.
I was wondering if anyone could assist me with what I thought was going to be a simple usage of the cache api.
My issue is that I cannot seem to get the cache to store the body properly...
The cache key is getting stored and properly invalidated after 10 seconds but the body is always an empty object when the cache is matched.
The logs are showing up as this with an empty body when hitting the cache.
5 replies