Skip to content

Commit c9aab56

Browse files
NicolappsConvex, Inc.
authored andcommitted
Remove .js extension in convex run errors (#40545)
**Before** ``` $ npx convex run asd ✖ Failed to run function "asd": Error: [Request ID: 3e7675304ea5889a] Server Error Could not find function for 'asd'. Did you forget to run `npx convex dev` or `npx convex deploy`? Available functions: • messages.js:list • messages.js:send ``` **After** ``` $ npx convex run asd ✖ Failed to run function "asd": Error: [Request ID: 70542bfe9ad12af2] Server Error Could not find function for 'asd'. Did you forget to run `npx convex dev` or `npx convex deploy`? Available functions: • messages:list • messages:send ``` GitOrigin-RevId: 7fe5e5115da4795d05cb89a73e10f7160bb3d1c9
1 parent ff2203b commit c9aab56

File tree

1 file changed

+2
-2
lines changed
  • npm-packages/convex/src/cli/lib

1 file changed

+2
-2
lines changed

npm-packages/convex/src/cli/lib/run.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ export async function runFunctionAndLog(
8686
const path =
8787
separatorPos === -1
8888
? ""
89-
: identifier.substring(0, separatorPos + 1);
89+
: identifier.substring(0, separatorPos).replace(/\.js$/, "");
9090
const name =
9191
separatorPos === -1
9292
? identifier
9393
: identifier.substring(separatorPos + 1);
9494

95-
return `• ${chalk.gray(path)}${name}`;
95+
return `• ${chalk.gray(`${path}:`)}${name}`;
9696
});
9797

9898
const availableFunctionsMessage =

0 commit comments

Comments
 (0)