clar1k
clar1k2mo ago

Can't push the changes to dev deployment

✖ Error: Unable to push deployment config to https://flexible-firefly-810.convex.cloud ✖ Error fetching POST https://flexible-firefly-810.convex.cloud/api/push_config 400 Bad Request: InvalidModules: Hit an error while pushing: Loading the pushed modules encountered the following error: Uncaught unhandledRejection: Cannot read properties of undefined (reading 'log') --- There is no .log accessing of property in my convex folder like at all but i still have this bug somehow :(
10 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!
clar1k
clar1kOP2mo ago
No description
clar1k
clar1kOP2mo ago
So i was just looking at code, changed some random variable name and it worked. Relly weird one :)
clar1k
clar1kOP2mo ago
No description
clar1k
clar1kOP2mo ago
Still having this problem 😢
No description
ballingt
ballingt2mo ago
Pretty annoying there's no stack trace for this. Can you try removing libraries one at a time to see wich lirbary it is? Or which function it is?
clar1k
clar1kOP2mo ago
{
"name": "@newnewx.ceo/backend",
"version": "1.0.0",
"scripts": {
"dev": "convex dev",
"dev:setup": "convex dev --configure --until-success"
},
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
"typescript": "^5.8.3"
},
"dependencies": {
"@convex-dev/polar": "^0.5.0",
"@polar-sh/sdk": "^0.34.3",
"convex": "^1.25.0"
}
}
{
"name": "@newnewx.ceo/backend",
"version": "1.0.0",
"scripts": {
"dev": "convex dev",
"dev:setup": "convex dev --configure --until-success"
},
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
"typescript": "^5.8.3"
},
"dependencies": {
"@convex-dev/polar": "^0.5.0",
"@polar-sh/sdk": "^0.34.3",
"convex": "^1.25.0"
}
}
My libraries that i use Also i find really weird behaviour after. I have an twitterAuth.ts file with actions I have a defined action and i run internal mutation there
const mutation = await ctx.runMutation(internal.user.create, {
twitterId: result.user.id,
name: result.user.name,
username: result.user.username,
imageUrl: result.user.image,
});
const mutation = await ctx.runMutation(internal.user.create, {
twitterId: result.user.id,
name: result.user.name,
username: result.user.username,
imageUrl: result.user.image,
});
When i try to access value returned from the mutation i get this error + all the types from convex become any. That mutation also will return any, but i was returning user from the database (internal.user.create) That is my user.ts file
export const create = internalMutation({
args: {
name: v.string(),
username: v.string(),
imageUrl: v.string(),
twitterId: v.string(),
},
handler: async (c, args) => {
const users = await c.db
.query("users")
.filter((q) => q.eq(q.field("twitterId"), args.twitterId))
.collect();

if (users.length > 0) {
throw new ConvexError("User already exists");
}

await c.db.insert("users", {
twitterId: args.twitterId,
name: args.name,
username: args.username,
imageUrl: args.imageUrl,
voteCount: 0,
candidateVoteCount: 0,
isCandidate: false,
});

return { ok: true };
},
});
export const create = internalMutation({
args: {
name: v.string(),
username: v.string(),
imageUrl: v.string(),
twitterId: v.string(),
},
handler: async (c, args) => {
const users = await c.db
.query("users")
.filter((q) => q.eq(q.field("twitterId"), args.twitterId))
.collect();

if (users.length > 0) {
throw new ConvexError("User already exists");
}

await c.db.insert("users", {
twitterId: args.twitterId,
name: args.name,
username: args.username,
imageUrl: args.imageUrl,
voteCount: 0,
candidateVoteCount: 0,
isCandidate: false,
});

return { ok: true };
},
});
clar1k
clar1kOP2mo ago
omg i am so frustrated with this error. i can't ship 😢
No description
ampp
ampp2mo ago
its either a typo or a bad import circular reference type thing. which is usually rare.
ballingt
ballingt2mo ago
Can you fine a commit that worked? Finding the first commit that broke would be interesting, agree this error message is pretty frustrating. Are you using "use node" at the top of any files?

Did you find this page helpful?