cf properties in request is broken
Closed this issue · 6 comments
vickyRathee commented
What version of Hono are you using?
4.6.3
What runtime/platform is your app running on?
Cloudflare pages
What steps can reproduce the bug?
The cf
properties are not exported in req.raw
?
tsconfig.json
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "Bundler",
"strict": false,
"skipLibCheck": true,
"lib": ["esnext", "dom"],
"types": ["@cloudflare/workers-types", "vite/client"],
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
}
}
What is the expected behavior?
The TS should not complain
What do you see instead?
TS error
Additional information
No response
yusukebe commented
Hi @vickyRathee
There is a conflict of definition of Response
between Cloudflare's and DOM's. Remove the dom
from your tsconfig.json
:
"lib": ["esnext"],
vickyRathee commented
@yusukebe that doesn't made any difference, still TS error.
Already tried closing vscode > reopen etc.
yusukebe commented
I can't reproduce it. Please provide a minimal project to reproduce it if you want we help you.
vickyRathee commented
@yusukebe Sure, I will create one
github-actions commented
This issue has been marked as stale due to inactivity.
github-actions commented
Closing this issue due to inactivity.