diff --git a/core/deno_deps.ts b/core/deno_deps.ts index 06281c40..bd3905e7 100644 --- a/core/deno_deps.ts +++ b/core/deno_deps.ts @@ -31,7 +31,16 @@ export type Range = { export async function getAllDenoCachedDeps(): Promise { const depsRootDir = getDenoDepsDir(); const deps: Deps[] = []; - const protocols = await fs.readdir(depsRootDir); + let protocols: string[] = []; + + try { + protocols = await fs.readdir(depsRootDir); + } catch (error) { + //deno/deps directory does not exists + if (error.code === "ENOENT") { + return deps; + } + } await Promise.all( protocols.map(async (protocol) => {