Skip to content

Commit 81955a6

Browse files
committed
revert script
1 parent facf9fc commit 81955a6

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

app/utils/local/scripts.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,26 @@ async function waitForReady(child, expectedResponse) {
2424
}
2525

2626
async function waitNuxt(nuxtProcess) {
27+
nuxtProcess.stderr.on("data", (data) => {
28+
console.log("Nuxt STDERR:", data.toString().trim());
29+
});
30+
nuxtProcess.on("close", (code) => {
31+
console.log(`Nuxt process closed with code ${code}`);
32+
});
33+
2734
for await (const [data] of on(nuxtProcess.stdout, "data")) {
2835
const output = data.toString();
29-
console.log("Nuxt:", output);
36+
console.log("Nuxt STDOUT:", output.trim());
3037
const portMatch = output.match(/Listening on http:\/\/\[::\]:(?<port>\d+)/u);
3138
if (portMatch) {
32-
const [, nuxtPort] = portMatch;
33-
34-
console.log("Nuxt listening on port", nuxtPort);
35-
return nuxtPort;
39+
console.log("Nuxt listening on port", portMatch.groups.port);
40+
nuxtProcess.stdout.on("data", (newData) => {
41+
console.log("Nuxt STDOUT:", newData.toString().trim());
42+
});
43+
return portMatch.groups.port;
3644
}
3745
}
38-
throw new Error("Nuxt process closed without accepting connections");
46+
throw new Error("Nuxt process closed");
3947
}
4048

4149
async function runBrowser(scriptName) {

0 commit comments

Comments
 (0)