diff --git a/modules/desktop/electron/libs/tea-dir.ts b/modules/desktop/electron/libs/tea-dir.ts index 4a8f0fd..f27e0da 100644 --- a/modules/desktop/electron/libs/tea-dir.ts +++ b/modules/desktop/electron/libs/tea-dir.ts @@ -30,6 +30,12 @@ export const getGuiPath = () => { export async function getInstalledPackages(): Promise { const pkgsPath = getTeaPath(); + + if (!fs.existsSync(pkgsPath)) { + log.info(`packages path ${pkgsPath} does not exist, no installed packages`); + return []; + } + log.info("recursively reading:", pkgsPath); const folders = await deepReadDir({ dir: pkgsPath,