From 69a5147d7a4d1bfec334b70034c025ac0b372bef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Kre=C4=8Dmer?= <t.krecmer@quadient.com>
Date: Wed, 7 Sep 2022 10:49:14 +0200
Subject: [PATCH] fix: studio 404 not found

---
 src/models/Studio.ts | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/models/Studio.ts b/src/models/Studio.ts
index 58547fe6a2e..4fbac8e34bc 100644
--- a/src/models/Studio.ts
+++ b/src/models/Studio.ts
@@ -44,9 +44,13 @@ export function start(filePath: string, port: number = DEFAULT_PORT): void {
     }
   });
 
+  const studioBuildFolder = existsSync(resolve(__dirname, '../../node_modules/@asyncapi/studio/build')) ?
+    resolve(__dirname, '../../node_modules/@asyncapi/studio/build') : 
+    resolve(__dirname, '../../../../@asyncapi/studio/build');
+
   const server = createServer((request, response) => {
     return serveHandler(request, response, {
-      public: resolve(__dirname, '../../node_modules/@asyncapi/studio/build'),
+      public: studioBuildFolder,
     });
   });