From 2e57d5f5017f0766df992e302b6245e34c71895c Mon Sep 17 00:00:00 2001 From: luo2430 Date: Tue, 16 Jun 2026 17:15:44 +0800 Subject: [PATCH] fix: use package.json as sole indicator of project existence --- src/core/project/script/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/project/script/index.ts b/src/core/project/script/index.ts index a98117a93..173d793a8 100644 --- a/src/core/project/script/index.ts +++ b/src/core/project/script/index.ts @@ -147,7 +147,7 @@ export class Project implements IProject { public static async create(projectPath: string, type: ProjectType = '3d'): Promise { try { const packageJSONPath = Project.getPackageJsonPath(projectPath); - if (existsSync(projectPath) || existsSync(packageJSONPath)) { + if (existsSync(packageJSONPath)) { throw new Error('Failed to create project, project exist'); } await mkdir(projectPath, { recursive: true });