mukaddamzaid commited on
Commit
0d06a18
·
1 Parent(s): 6760d92

fix: resolve promise handling in subprocess for package installation

Browse files
Files changed (1) hide show
  1. app/api/chat/route.ts +1 -1
app/api/chat/route.ts CHANGED
@@ -126,7 +126,7 @@ export async function POST(req: Request) {
126
  }
127
  });
128
  // wait for the subprocess to finish
129
- await new Promise((resolve, reject) => {
130
  subprocess.on('close', resolve);
131
  console.log("installed python package", packageName);
132
  });
 
126
  }
127
  });
128
  // wait for the subprocess to finish
129
+ await new Promise((resolve) => {
130
  subprocess.on('close', resolve);
131
  console.log("installed python package", packageName);
132
  });