Made the CLI error more helpful if you’re not running your Next.js app

This commit is contained in:
James Ritchie
2023-08-11 11:24:52 +01:00
parent d395b95762
commit c246578a81
2 changed files with 8 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@trigger.dev/cli": patch
---
Made the CLI error more helpful if youre not running your Next.js app
+3 -1
View File
@@ -84,7 +84,9 @@ export async function devCommand(path: string, anyOptions: any) {
},
});
} catch (err) {
logger.error(`❌ [trigger.dev] No server found on port ${options.port}.`);
logger.error(
`❌ [trigger.dev] No server found on port ${options.port}. Make sure your Next.js app is running and try again.`
);
telemetryClient.dev.failed("no_server_found", options);
return;
}