s9tpepper
s9tpepper
CDCloudflare Developers
Created by s9tpepper on 5/16/2024 in #workers-help
Cannot file module '@cloudflare:workers'
maybe that's where the serialization errors are coming from, I'll refactor those objects out and retry
26 replies
CDCloudflare Developers
Created by s9tpepper on 5/16/2024 in #workers-help
Cannot file module '@cloudflare:workers'
I dont think the solution is usable though, the test interface throws an error trying to use that worker now as a binding Could not serialize object of type \"Fetcher\". This type does not support serialization. - I think I'm going to have to retreat on trying to use the worker as RPC
26 replies
CDCloudflare Developers
Created by s9tpepper on 5/16/2024 in #workers-help
Cannot file module '@cloudflare:workers'
yea
26 replies
CDCloudflare Developers
Created by s9tpepper on 5/16/2024 in #workers-help
Cannot file module '@cloudflare:workers'
so wrangler lets me deploy if I add this:
export default {
fetch() {
// eslint-disable-next-line
console.log('unimplemented')
},
}
export default {
fetch() {
// eslint-disable-next-line
console.log('unimplemented')
},
}
The error about being unable to resolve cloudflare:workers is still there though - not sure why
26 replies
CDCloudflare Developers
Created by s9tpepper on 5/16/2024 in #workers-help
Cannot file module '@cloudflare:workers'
and wrangler still gives the same error when I try to deploy
26 replies
CDCloudflare Developers
Created by s9tpepper on 5/16/2024 in #workers-help
Cannot file module '@cloudflare:workers'
now its just Unable to resolve path to module 'cloudflare:workers'
26 replies
CDCloudflare Developers
Created by s9tpepper on 5/16/2024 in #workers-help
Cannot file module '@cloudflare:workers'
the error did change though
26 replies
CDCloudflare Developers
Created by s9tpepper on 5/16/2024 in #workers-help
Cannot file module '@cloudflare:workers'
hrm, nevermind - LSP removed the error and then brought it back :/
26 replies
CDCloudflare Developers
Created by s9tpepper on 5/16/2024 in #workers-help
Cannot file module '@cloudflare:workers'
good catch, sorry about that lol - damn, caught by one character
26 replies
CDCloudflare Developers
Created by s9tpepper on 5/16/2024 in #workers-help
Cannot file module '@cloudflare:workers'
:NotLikeThis:
26 replies
CDCloudflare Developers
Created by s9tpepper on 5/16/2024 in #workers-help
Cannot file module '@cloudflare:workers'
this is the main function:
export class DrCheck extends WorkerEntrypoint {
async check(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
const response = await fetch(request)

if (response.status === 200) {
return handle200(request, response, env, ctx)
}

if (response.status > 499) {
return await handle500(request, env)
}

return new Response(response.body, response)
}
}
export class DrCheck extends WorkerEntrypoint {
async check(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
const response = await fetch(request)

if (response.status === 200) {
return handle200(request, response, env, ctx)
}

if (response.status > 499) {
return await handle500(request, env)
}

return new Response(response.body, response)
}
}
26 replies