Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Fix nock import

Fang-Pen Lin5623c666b893
diff --git a/backend/src/server/routes/bdd/bdd-nock-router.dev.ts b/backend/src/server/routes/bdd/bdd-nock-router.dev.ts
index 17db89788c..ee5617686f 100644
--- a/backend/src/server/routes/bdd/bdd-nock-router.dev.ts
+++ b/backend/src/server/routes/bdd/bdd-nock-router.dev.ts
@@ -16,10 +16,9 @@ if (process.env.NODE_ENV !== "development") {
export const registerBddNockRouter = async (server: FastifyZodProvider) => {
const appCfg = getConfig();
- const importNock = () => {
- // Notice: it seems like importing nock somehow increase memory usage a lots, let's import it lazily.
- // eslint-disable-next-line import/no-extraneous-dependencies
- return import("nock");
+ const importNock = async () => {
+ const { default: nock } = await import("nock");
+ return nock;
};
const checkIfBddNockApiEnabled = () => {