yinks
yinks
Explore posts from servers
CDCloudflare Developers
Created by yinks on 8/19/2024 in #workers-help
No loader is configured for ".node" files
sigh
3 replies
TtRPC
Created by yinks on 7/28/2024 in #❓-help
Suddenly started getting a `TRPCClientError: Unexpected token '<', "<!DOCTYPE...` error
It's stupid CORS issue. I hate CORS!
5 replies
TtRPC
Created by yinks on 7/28/2024 in #❓-help
Suddenly started getting a `TRPCClientError: Unexpected token '<', "<!DOCTYPE...` error
No description
5 replies
TtRPC
Created by yinks on 7/28/2024 in #❓-help
Suddenly started getting a `TRPCClientError: Unexpected token '<', "<!DOCTYPE...` error
err TRPCClientError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON at _TRPCClientError.from (chunk-JJSVPVKZ.js?v=ba80d384:1334:12) at chunk-JJSVPVKZ.js?v=ba80d384:1865:42Caused by: SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
5 replies
CDCloudflare Developers
Created by yinks on 7/25/2024 in #workers-help
Is there a way to specify the wrangler file directory?
Thank you!
11 replies
CDCloudflare Developers
Created by yinks on 7/25/2024 in #workers-help
Is there a way to specify the wrangler file directory?
You fixed it for me 😭
11 replies
CDCloudflare Developers
Created by yinks on 7/25/2024 in #workers-help
Is there a way to specify the wrangler file directory?
oh yes it will!
11 replies
CDCloudflare Developers
Created by yinks on 7/25/2024 in #workers-help
Is there a way to specify the wrangler file directory?
the worker isn't in the root, it's in apps/frontend but since i'm using yarn workspaces, it knows the directory it is
11 replies
CDCloudflare Developers
Created by yinks on 7/25/2024 in #workers-help
Is there a way to specify the wrangler file directory?
I forgot to mention it's a turborepo monorepo
11 replies
CDCloudflare Developers
Created by yinks on 7/25/2024 in #workers-help
Is there a way to specify the wrangler file directory?
The build script has to be at the root for turbo to build dependent packages: npx turbo run build --filter=@frontend
11 replies
DTDrizzle Team
Created by yinks on 7/17/2024 in #help
Is it possible to use drizzle with d1 on http
I'm aware there is D1 http adapter for Drizzle Kit, but I'm referring to the db client https://orm.drizzle.team/learn/guides/d1-http-with-drizzle-kit
3 replies
CDCloudflare Developers
Created by yinks on 9/13/2023 in #workers-help
Correct way to set CORS in Cloudflare Workers
I added this line at the top of the function
// handle CORS preflight request
if (request.method === 'OPTIONS') {
return new Response(null, {
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': '*',
'Access-Control-Allow-Credentials': 'true',
'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',
},
});
}
// handle CORS preflight request
if (request.method === 'OPTIONS') {
return new Response(null, {
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': '*',
'Access-Control-Allow-Credentials': 'true',
'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',
},
});
}
3 replies
CDCloudflare Developers
Created by yinks on 9/13/2023 in #workers-help
Correct way to set CORS in Cloudflare Workers
Thank you @Leo That worked
3 replies