From 90abcb2cf7b4aa3405b43508ef52502151523e12 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Thu, 29 Jun 2023 21:53:16 +0100 Subject: [PATCH] Improved messages --- packages/cli/src/commands/dev.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/cli/src/commands/dev.ts b/packages/cli/src/commands/dev.ts index 2295d8a71..fb27c322e 100644 --- a/packages/cli/src/commands/dev.ts +++ b/packages/cli/src/commands/dev.ts @@ -25,10 +25,12 @@ export async function devCommand(path: string, anyOptions: any) { // Detect if are are in a Next.js project const isNextJsProject = await detectNextJsProject(resolvedPath); if (!isNextJsProject) { - logger.error("You must run this command in a Next.js project."); + logger.error( + `You must run this command in a Next.js project: ${resolvedPath}` + ); process.exit(1); } - logger.success(`✅ Detected valid Next.js project at ${resolvedPath}`); + logger.success(`✅ Detected valid Next.js project`); // Read from package.json to get the endpointId const endpointId = await getEndpointIdFromPackageJson(resolvedPath); @@ -137,9 +139,3 @@ async function refreshEndpoint( return response.data; } - -function wait(duration: number) { - return new Promise((resolve) => { - setTimeout(resolve, duration); - }); -}