diff --git a/packages/agent/src/builder/agent.ts b/packages/agent/src/builder/agent.ts index ffc51d0944..adcd277125 100644 --- a/packages/agent/src/builder/agent.ts +++ b/packages/agent/src/builder/agent.ts @@ -9,7 +9,6 @@ import { import { writeFile } from 'fs/promises'; import Koa from 'koa'; import Router from '@koa/router'; -import fastifyExpress from '@fastify/express'; import http from 'http'; import { AgentOptions } from '../types'; @@ -237,7 +236,7 @@ export default class AgentBuilder { // 'fastify 3' if (e.code === 'FST_ERR_MISSING_MIDDLEWARE') { fastify - .register(fastifyExpress) + .register(import('@fastify/express')) .then(() => { fastify.use('/forest', callback); })