diff --git a/src/server/handlers/catch-all-handler.tsx b/src/server/handlers/catch-all-handler.tsx index b9ff13bf..efadee42 100644 --- a/src/server/handlers/catch-all-handler.tsx +++ b/src/server/handlers/catch-all-handler.tsx @@ -1,5 +1,6 @@ import { initializeSite, isAuthPath } from "@utils/app"; import { ErrorPageData } from "@utils/types"; +import fetch from "cross-fetch"; import type { Request, Response } from "express"; import { StaticRouter, matchPath } from "inferno-router"; import { renderToString } from "inferno-server"; diff --git a/src/server/handlers/manifest-handler.ts b/src/server/handlers/manifest-handler.ts index 6858cffd..b9a11089 100644 --- a/src/server/handlers/manifest-handler.ts +++ b/src/server/handlers/manifest-handler.ts @@ -1,3 +1,4 @@ +import fetch from "cross-fetch"; import type { Request, Response } from "express"; import { LemmyHttp } from "lemmy-js-client"; import { getHttpBaseExternal, getHttpBaseInternal } from "../../shared/env"; diff --git a/src/server/utils/fetch-icon-png.ts b/src/server/utils/fetch-icon-png.ts index 12b09e70..75497a21 100644 --- a/src/server/utils/fetch-icon-png.ts +++ b/src/server/utils/fetch-icon-png.ts @@ -1,3 +1,5 @@ +import fetch from "cross-fetch"; + export async function fetchIconPng(iconUrl: string) { return await fetch(iconUrl) .then(res => res.blob())