makisuo
makisuo
Explore posts from servers
CDCloudflare Developers
Created by makisuo on 4/11/2025 in #workers-help
Error using Mysql2 with Vite
I'm trying to use Mysql2 with Vite + React Router but some poly fills seem to not work correctly for me. When importing in mysql2 in any file it fails to load wiht the error
buffer.hasOwnProperty is not a function
buffer.hasOwnProperty is not a function
Im using this compatabiltity date and flag:
"compatibility_date": "2025-04-08",
"compatibility_flags": ["nodejs_compat"],
"compatibility_date": "2025-04-08",
"compatibility_flags": ["nodejs_compat"],
1 replies
CDCloudflare Developers
Created by makisuo on 4/5/2025 in #workers-help
Workers Vite in browser not trying to reach worker
I'm trying to rebuild my setup to deploy my React SPA together with my api in one worker. For this im using the cloudflare worker vite plugin with
json
"assets": {
"not_found_handling": "single-page-application"
}
json
"assets": {
"not_found_handling": "single-page-application"
}
now i have an issue that it always just shows not found on worker paths when accessing them in browser. This is a big issue since I have some /callback routes for auth flows I need the user to be redirected to. Anything I need to configure?
5 replies
CDCloudflare Developers
Created by makisuo on 1/17/2025 in #pages-help
Monorepo Builds keep using npm instead of bun
As title says, I keep having the issue that the automatic builds correctly identify bun and it's version but proceed trying to install with npm. Can I somehow force Cloudflare Build to use bun over npm?
12 replies
CDCloudflare Developers
Created by makisuo on 4/11/2024 in #pages-help
NextJS Dev Server keeps on crashing with D1
Randomly crashing when hot reloading, if there is a any syntax error while hot relaoding it's guranteed to crash with this error, if not it seems to be a 50/50. Anyone experience this?
tRPC failed on <no-path>: Invalid state: Controller is already closed
/node_modules/.pnpm/wrangler@3.48.0/node_modules/wrangler/wrangler-dist/cli.js:29573
throw a;
tRPC failed on <no-path>: Invalid state: Controller is already closed
/node_modules/.pnpm/wrangler@3.48.0/node_modules/wrangler/wrangler-dist/cli.js:29573
throw a;
1 replies
DTDrizzle Team
Created by makisuo on 11/10/2023 in #help
Extracting the Query "With" Type
As title said I'm trying to extract the with type of a query, I tried out a bunch of stuff with no luck so far.
const query = db.user.findFirst({ with: This Type})
const query = db.user.findFirst({ with: This Type})
4 replies
CDCloudflare Developers
Created by makisuo on 8/17/2023 in #pages-help
TCP connection possible in NextJS?
Since cloudflare supports tcp connections on workers is it somehow possible to use tcp connections in NextJS
1 replies
TtRPC
Created by makisuo on 7/9/2023 in #❓-help
NextJS 13 Build failing
Issue also seen in this PR  https://github.com/trpc/trpc/pull/4574 I found. None of the webpack workarounds seem to work for me to get it building again. Any updates on this?
1 replies
CDCloudflare Developers
Created by makisuo on 6/13/2023 in #pages-help
NextJS Monorepo Setup
Is it possible to deploy a NextJS app from a turbo monorepo
3 replies
CDCloudflare Developers
Created by makisuo on 6/11/2023 in #workers-help
Cloudflare Worker Rust Tail Worker
Is it possible to set a rust worker as a tail worker?
3 replies
CDCloudflare Developers
Created by makisuo on 6/10/2023 in #workers-help
Worker always returns 200 with Hono
Not sure if this is the right place for this but, No matter what status I return it doesnt it seem to default to 200. when using new Response() it works without any issues. What am I doing wrong?

return c.json({
body: {
status: "404",
message: "No source found with that id",
},
status: 404,
})

return c.json({
body: {
status: "404",
message: "No source found with that id",
},
status: 404,
})
3 replies
CDCloudflare Developers
Created by makisuo on 6/7/2023 in #workers-help
Best Approach for partial retrying
Was wondering what the best approach for my retry problem would be in cloudflare workers since haven't been using them for too long. I have a worker that does some things like creating a unique event id etc fetches the right project requested etc, then I send all that data via a fetch request, now I would like if that fetch request fails. To just retry the fetch on a delay. What would be the best implementation for this? Having a Service Worker that just does the fetch request with and DO Alarm? Or is there a better way?
1 replies
CDCloudflare Developers
Created by makisuo on 5/29/2023 in #pages-help
Error On Build: Failed to publish your Function. Got error: multipart: message too large
16 replies