huzz
huzz•3mo ago

Convex Schema

Hey guys, I am having an issue while using "convex": "^1.27.0" in my next js project. When running the convex dev command the server runs perfectly fine without any errors although the schemas don't get synced to the dashboard (for example the table isn't created). I already tried to downgrade to 1.26.1 and it didn't work. Thank you!
8 Replies
Convex Bot
Convex Bot•3mo 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!
erquhart
erquhart•3mo ago
Can you run npx convex dashboard from your project directory in the cli to make sure you're looking at the correct dashboard
huzz
huzzOP•2mo ago
Yep it redirects me to the dashboard page I am already in Hey @erquhart I tried today again and still the same issue. Although I can see the functions in the dashboard but the data section is still empty
erquhart
erquhart•2mo ago
Can you share a screenshot of what you're seeing on the data page
huzz
huzzOP•2mo ago
import { defineSchema, defineTable } from "convex/server";
import { v } from "convex/values";

export default defineSchema({
users: defineTable({
clerkUserId: v.string(),
email: v.string(),
firstName: v.optional(v.string()),
lastName: v.optional(v.string()),
imageUrl: v.optional(v.string()),
}).index("byClerkUserId", ["clerkUserId"]),
});
import { defineSchema, defineTable } from "convex/server";
import { v } from "convex/values";

export default defineSchema({
users: defineTable({
clerkUserId: v.string(),
email: v.string(),
firstName: v.optional(v.string()),
lastName: v.optional(v.string()),
imageUrl: v.optional(v.string()),
}).index("byClerkUserId", ["clerkUserId"]),
});
> pnpm dlx convex dev

āœ” Provisioned a dev deployment and saved its name as CONVEX_DEPLOYMENT to .env.local

Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or support@convex.dev
View the Convex dashboard at https://dashboard.convex.dev/d/festive-tern-173

āœ” 21:25:19 Convex functions ready! (1.36s)
> pnpm dlx convex dev

āœ” Provisioned a dev deployment and saved its name as CONVEX_DEPLOYMENT to .env.local

Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or support@convex.dev
View the Convex dashboard at https://dashboard.convex.dev/d/festive-tern-173

āœ” 21:25:19 Convex functions ready! (1.36s)
No description
erquhart
erquhart•2mo ago
What file is that first code snippet from like what's the path from project root
huzz
huzzOP•2mo ago
F**K I just realised I had the file named schemas.ts not schema.ts my bad mate thanks a lot for asking the right question! it worked!
erquhart
erquhart•2mo ago
šŸŽ‰

Did you find this page helpful?