import { existsSync } from "fs";
import fs from "fs/promises";
export async function createDirectory(path: string) {
if (existsSync(path)) {
try {
await fs.rm(path, { recursive: true, force: true });
} catch (e) {
console.log("ERROR", e);
}
}
await fs.mkdir(path, { recursive: true });
}
ENOTEMPTY: directory not empty
Within the dist/resources folder, there exists a file named default_app.asar. Manually deleting the file works, but the error reappears after it is restored by npm install
. Upon investigation, it was found that the file is not being used by any process.