You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1311 | if (typeof handler !== "function") {
1312 | throw new TypeError(`Invalid handler. It should be a function: ${handler}`);
1313 | }
1314 | return (event) => {
1315 | if (!event.node) {
1316 | throw new Error(
^
error: [h3] Executing Node.js middleware is not supported in this server!
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
Yes, the Vite middleware is still a node connect instance
The fromNodeHandler function transforms the Node syntax (req, res) => {} into an h3 handler.
This handler should be able to run on any runtime and not just Node as stated in the docs
Runtime Agnostic
Your code will work on any JavaScript runtime including Node.js, Bun, Deno and Workers.
Environment
Operating System: MacOS
H3 Version: [email protected]
Package Manager: [email protected]
Reproduction
bun run index.ts
Describe the bug
The server now returns an error 500 on any route.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: