Vike + Hono + Deno #1938
-
Hello there! May i ask you for a little help please? I want to create my new tech. stack boilerplate consting of Deno + Hono + Vike, because i was used to have Node + Next with many compiler settings and i don't like NextJS anymore. But i'm struggling with setup and i cannot found any good docs about this. I want to have custom server (api routes) and i want to start server with Deno. How to do it properly? I managed to create this example repo https://github.com/jandolezal71/hono-deno-vike-boilerplate where when you run I don't know if i suppose to ask here, or in Deno or Vite :D Repro:
I get
This is my {
"imports": {
"@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
"@hono/hono": "jsr:@hono/hono@^4.6.7",
"@hono/vite-dev-server": "npm:@hono/vite-dev-server@^0.16.0",
"@types/node": "npm:@types/node@^22.8.1",
"@vitejs/plugin-react": "npm:@vitejs/plugin-react@^4.3.3",
"react": "npm:react@^18.3.1",
"react-dom": "npm:react-dom@^18.3.1",
"vike": "npm:vike@^0.4.199",
"vike-react": "npm:vike-react@^0.5.7",
"vite": "npm:vite@^5.4.10",
"~server/": "./src/server/"
},
"tasks": {
"dev": "deno run --allow-all --inspect --vendor src/server/main.ts"
},
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx",
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"lib": ["ES2020","dom", "dom.iterable", "dom.asynciterable", "deno.ns"],
"noUnusedParameters": true,
"strictNullChecks": true,
"noFallthroughCasesInSwitch": true
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
In that failing file i saw it wants to access If i'll try to patch that req just for test, next error appear Is there any way how to deal with this? |
Beta Was this translation helpful? Give feedback.
-
If i remove whole vite dev server middleware from server file and instead use
and use
Server will boot up, but: |
Beta Was this translation helpful? Give feedback.
-
Have you tried to use Bati for having Hono + Node.js + Vike and then replace Node.js with Deno? In principle, that should do the trick now that Deno supports Node.js apps. |
Beta Was this translation helpful? Give feedback.
Have you tried to use Bati for having Hono + Node.js + Vike and then replace Node.js with Deno? In principle, that should do the trick now that Deno supports Node.js apps.