Aki
Aki2mo ago

I would like to add to Functions.

However, when I did npx convex dev, nothing was added to the deployed functions. I saw in the project log that it was deployed, so I think I have the right deploy destination. I am not sure which one is the problem, so I will list the possible ones. We use next.js and convex. You can find my urls.ts in the convex folder It should be added to functions when deployed
import { query, mutation } from "./_generated/server";
import { v } from "convex/values";

export const getURL = query({
args: {
id: v.string()
},
handler: async (ctx, { id }) => {
const url = await ctx.db.query("url").filter(q => q.eq(q.field("_id"), id)).first();
return url;
},
});
import { query, mutation } from "./_generated/server";
import { v } from "convex/values";

export const getURL = query({
args: {
id: v.string()
},
handler: async (ctx, { id }) => {
const url = await ctx.db.query("url").filter(q => q.eq(q.field("_id"), id)).first();
return url;
},
});
Also, npx convex dev --verbose skipped all files in _generated. Below is the log of that case.
aki@Spanner ~ % npx convex dev --verbose
[verbose] 2025-02-27T23:19:42.864Z Skipping convex/_generated/api.d.ts
[verbose] 2025-02-27T23:19:42.865Z Skipping convex/_generated/api.js
[verbose] 2025-02-27T23:19:42.866Z Skipping convex/_generated/dataModel.d.ts
[verbose] 2025-02-27T23:19:42.866Z Skipping convex/_generated/server.d.ts
[verbose] 2025-02-27T23:19:42.866Z Skipping convex/_generated/server.js
Codegen finished.
[verbose] 2025-02-27T23:19:42.873Z Skipping convex/_generated/api.d.ts
[verbose] 2025-02-27T23:19:42.873Z Skipping convex/_generated/api.js
[verbose] 2025-02-27T23:19:42.873Z Skipping convex/_generated/dataModel.d.ts
[verbose] 2025-02-27T23:19:42.873Z Skipping convex/_generated/server.d.ts
[verbose] 2025-02-27T23:19:42.873Z Skipping convex/_generated/server.js
Convex's runtime modules: []
Remote config will be overwritten with the following changes:
aki@Spanner ~ % npx convex dev --verbose
[verbose] 2025-02-27T23:19:42.864Z Skipping convex/_generated/api.d.ts
[verbose] 2025-02-27T23:19:42.865Z Skipping convex/_generated/api.js
[verbose] 2025-02-27T23:19:42.866Z Skipping convex/_generated/dataModel.d.ts
[verbose] 2025-02-27T23:19:42.866Z Skipping convex/_generated/server.d.ts
[verbose] 2025-02-27T23:19:42.866Z Skipping convex/_generated/server.js
Codegen finished.
[verbose] 2025-02-27T23:19:42.873Z Skipping convex/_generated/api.d.ts
[verbose] 2025-02-27T23:19:42.873Z Skipping convex/_generated/api.js
[verbose] 2025-02-27T23:19:42.873Z Skipping convex/_generated/dataModel.d.ts
[verbose] 2025-02-27T23:19:42.873Z Skipping convex/_generated/server.d.ts
[verbose] 2025-02-27T23:19:42.873Z Skipping convex/_generated/server.js
Convex's runtime modules: []
Remote config will be overwritten with the following changes:
Also, when I do npx convex dev and edit a file in the convex folder, it is no longer automatically deployed after I can no longer add it to functions, whereas it usually does so automatically.
3 Replies
Convex Bot
Convex Bot2mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
ballingt
ballingt2mo ago
Try a ls convex to show the contents of that convex folder Wherever you're running npx convex dev, try pwd to see what directory you're in
Aki
AkiOP2mo ago
Sorry for the late reply. I pwd'd and found that I was doing it in a totally unrelated directory. Sorry for the inconvenience.

Did you find this page helpful?