-
-
Notifications
You must be signed in to change notification settings - Fork 101
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
5.6.0
Plugin version
11.3.0
Node.js version
22.17.0
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
11
Description
{"level":50,"time":1758442323337,"pid":14084,"hostname":"user","reqId":"req-1","req":{"method":"GET","url":"/name","host":"localhost:4000","remoteAddress":"127.0.0.1","remotePort":54726},"res":{"statusCode":500},"err":{"type":"TypeError","message":"pool.request is not a function. (In 'pool.request(req, function(err, res) {\n if (err) {\n done(err);\n return;\n }\n delete res.headers["transfer-encoding"];\n done(null, { statusCode: res.statusCode, headers: res.headers, stream: res.body });\n })', 'pool.request' is undefined)","stack":"TypeError: pool.request is not a function. (In 'pool.request(req, function(err, res) {\n if (err) {\n done(err);\n return;\n }\n delete res.headers["transfer-encoding"];\n done(null, { statusCode: res.statusCode, headers: res.headers, stream: res.body });\n })', 'pool.request' is undefined)\n at handleUndici (C:\Users\user\OneDrive\Masaüstü\Works\Systems\api.workolla.com-micro\auth\node_modules\@fastify\reply-from\lib\request.js:178:10)\n at run (C:\Users\user\OneDrive\Masaüstü\Works\Systems\api.workolla.com-micro\auth\node_modules\@fastify\reply-from\index.js:296:7)\n at requestRetry (C:\Users\user\OneDrive\Masaüstü\Works\Systems\api.workolla.com-micro\auth\node_modules\@fastify\reply-from\index.js:310:5)\n at (C:\Users\user\OneDrive\Masaüstü\Works\Systems\api.workolla.com-micro\auth\node_modules\@fastify\reply-from\index.js:178:5)\n at handler (C:\Users\user\OneDrive\Masaüstü\Works\Systems\api.workolla.com-micro\auth\node_modules\@fastify\http-proxy\index.js:630:11)\n at preHandlerCallbackInner (C:\Users\user\OneDrive\Masaüstü\Works\Systems\api.workolla.com-micro\auth\node_modules\fastify\lib\handleRequest.js:157:24)\n at preHandlerCallback (C:\Users\user\OneDrive\Masaüstü\Works\Systems\api.workolla.com-micro\auth\node_modules\fastify\lib\handleRequest.js:125:5)\n at validationCompleted (C:\Users\user\OneDrive\Masaüstü\Works\Systems\api.workolla.com-micro\auth\node_modules\fastify\lib\handleRequest.js:115:5)\n at preValidationCallback (C:\Users\user\OneDrive\Masaüstü\Works\Systems\api.workolla.com-micro\auth\node_modules\fastify\lib\handleRequest.js:92:5)\n at handler (C:\Users\user\OneDrive\Masaüstü\Works\Systems\api.workolla.com-micro\auth\node_modules\fastify\lib\handleRequest.js:69:7)"},"msg":"pool.request is not a function. (In 'pool.request(req, function(err, res) {\n if (err) {\n done(err);\n return;\n }\n delete res.headers["transfer-encoding"];\n done(null, { statusCode: res.statusCode, headers: res.headers, stream: res.body });\n })', 'pool.request' is undefined)"}
{"level":30,"time":1758442323340,"pid":14084,"hostname":"user","reqId":"req-1","res":{"statusCode":500},"responseTime":5.0395000000003165,"msg":"request completed"}
Example Code:
import fastify from "fastify";
import fastifyHttpProxy from "@fastify/http-proxy";
const Fastify = fastify({
logger: true
})
await Fastify.register(fastifyHttpProxy, {
upstream: "https://google.com",
prefix: "/name"
})
Fastify.listen({ port: 4000, host: '0.0.0.0' })
I am using the latest version of Bun and was able to run it once, but afterwards it started giving me these errors. What should I do?
Link to code that reproduces the bug
https://github.com/luiijs/basic-http-proxy
Expected Behavior
No response