From 4d45d9808e7103d2d4a697c2d0eed7438cf36294 Mon Sep 17 00:00:00 2001 From: rizrmd Date: Thu, 30 May 2024 22:54:37 +0700 Subject: [PATCH] fix --- app/srv/ws/sync/code/parts/init/frontend.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/srv/ws/sync/code/parts/init/frontend.ts b/app/srv/ws/sync/code/parts/init/frontend.ts index c7a75382..7a2a7a21 100644 --- a/app/srv/ws/sync/code/parts/init/frontend.ts +++ b/app/srv/ws/sync/code/parts/init/frontend.ts @@ -10,6 +10,7 @@ import { user } from "../../../entity/user"; import { conns } from "../../../entity/conn"; import { SyncType } from "../../../type"; import { sendWS } from "../../../sync-handler"; +import { removeAsync } from "fs-jetpack"; const decoder = new TextDecoder(); export const initFrontEnd = async ( @@ -73,6 +74,9 @@ export const initFrontEnd = async ( cur.timeout = setTimeout(async () => { if (cur.ctx) { cur.timeout = null; + await removeAsync( + code.path(id_site, "site", "src", "node_modules") + ); initFrontEnd(root, id_site, true); } }, 5000);