diff --git a/src/config/io/generateTypeData.ts b/src/config/io/generateTypeData.ts index a39479f..e789a5f 100644 --- a/src/config/io/generateTypeData.ts +++ b/src/config/io/generateTypeData.ts @@ -33,6 +33,10 @@ async function readSubdir(subdir: string): Promise { export async function generateTypeData(): Promise { const mainDir = import.meta.env.SECRET_MODULES_PATH; + if (!mainDir || mainDir == "") { + throw new Error("Cannot generate types, missing SECRET_MODULES_PATH"); + } + const subdirs = await fs.readdir(mainDir, { withFileTypes: true, });