veronikakocheto
veronikakocheto•10mo ago

convex function not pushing from VS code to convex project dashboard

Hey guys! I'm struggling for a full day trying to figure this out, my backend teammate had to cancel for our project so I'm in charge of getting convex to integrate now and all I've done is front end stuff before 😢 Im trying to push the convex function I've created in my VS code js file to my convex dashboard for the project but it is not showing up after a whole ton of troubleshooting. I am using this html script tag: <script src="https://unpkg.com/convex@1.10.0/dist/browser.bundle.js"></script> <script> const CONVEX_URL = "https://my-actual-url.convex.cloud"; const client = new convex.ConvexClient(CONVEX_URL); client.onUpdate("messages:list", {}, (messages) => console.log(messages.map((msg) => msg.body)), ); </script> and this is the function in a js file under "functions" in my root directory: import { mutation } from "./_generated/server"; import { v } from "convex/values"; export const login = mutation({ args: { email: v.string(), password: v.string() }, handler: async ({ db }, { email, password }) => { // Query for user information const user = await db.table("users").filter(q => q.eq("email", email)).first(); // Placeholder for actual password verification // In a real application, you should hash the password and compare hashes if (user && user.password === password) { return { status: "success", user: user }; } else { return { status: "failed" }; } }, }); I am using the command "npx convex deploy" in the VS Code terminal and it seems to be showing as successful but not showing up on my dashboard: ✔ Deployed Convex functions to https://yes-i-have-my-actual-link-here.convex.cloud any help would be very much appreciated!!!!
3 Replies
ballingt
ballingt•10mo ago
Can you try npx convex dev? There are two different relevant deployments here and two different URLs
trace
trace•10mo ago
If you are working on this project for the hackathon, because of the time issue I would suggest you to use clerk.
ian
ian•10mo ago
npx convex dashboard will take you to the dashboard for your project. npx convex deploy pushes to prod. npx convex dev syncs to your dev deployment

Did you find this page helpful?