CabalDAO
CabalDAO
CCConvex Community
Created by CabalDAO on 11/20/2024 in #support-community
"New table referralOverview has IDs that conflict with existing table configColumns"
Hi, when trying to import a snapshot into a preview environment during a deploy, I get this error. Everything works fine locally when devving and then I export the snapshot directly from dev. I manually checked the ID's of configColumns against the ID's in referralOverview and there are no matches. How do I fix this?
11 replies
CCConvex Community
Created by CabalDAO on 11/14/2024 in #support-community
Too many bytes read in a single function execution in migration
Hi, I am trying to run a migration on a table. When docs come in in the migrateOne function, i get the above error. How can I possibly deal with my docs if I can't load a single doc in a query?
3 replies
CCConvex Community
Created by CabalDAO on 11/1/2024 in #support-community
Errors importing dayjs plugins
Hi, I have a file in convex/utils/dateToMs that I need to parse incoming dates in different formats. It requires the use of dayjs and some of it's plugins. The code seems to push successfully when just importing dayjs but the plugins are throwing an error:
import dayjs from "dayjs";
import customParseFormat from "dayjs/plugin/customParseFormat";
import utc from "dayjs/plugin/utc";
import timezone from "dayjs/plugin/timezone";

// Extend dayjs with needed plugins
dayjs.extend(customParseFormat);
dayjs.extend(utc);
dayjs.extend(timezone);

...
import dayjs from "dayjs";
import customParseFormat from "dayjs/plugin/customParseFormat";
import utc from "dayjs/plugin/utc";
import timezone from "dayjs/plugin/timezone";

// Extend dayjs with needed plugins
dayjs.extend(customParseFormat);
dayjs.extend(utc);
dayjs.extend(timezone);

...
Error:
Loading the pushed modules encountered the following
error:
Uncaught Failed to analyze actions/profility.js: Cannot find module '/tmp/source/943f1a24-5f23-4e42-bd13-bb41e56fdfe8/node_modules/dayjs/plugin/customParseFormat' imported from /tmp/source/943f1a24-5f23-4e42-bd13-bb41e56fdfe8/modules/actions/profility.js
Did you mean to import dayjs/plugin/customParseFormat.js?
Loading the pushed modules encountered the following
error:
Uncaught Failed to analyze actions/profility.js: Cannot find module '/tmp/source/943f1a24-5f23-4e42-bd13-bb41e56fdfe8/node_modules/dayjs/plugin/customParseFormat' imported from /tmp/source/943f1a24-5f23-4e42-bd13-bb41e56fdfe8/modules/actions/profility.js
Did you mean to import dayjs/plugin/customParseFormat.js?
I've also tried in convex.json to explicitly specify these packages instead of just externalPackages: [*] like so:
{
"node": {
"externalPackages": [
"*",
"dayjs",
"dayjs/plugin/customParseFormat",
"dayjs/plugin/utc",
"dayjs/plugin/timezone"
]
}
}
{
"node": {
"externalPackages": [
"*",
"dayjs",
"dayjs/plugin/customParseFormat",
"dayjs/plugin/utc",
"dayjs/plugin/timezone"
]
}
}
But to no avail.
23 replies
CCConvex Community
Created by CabalDAO on 10/9/2024 in #support-community
TeamNotFound
I recently updated the team and project name in convex and now when I try to deploy, it's telling me the old slug name is not found. How can I get it to know that the team/slug was changed? Error fetching POST https://provision.convex.dev/api/deployment/authorize_preview 404 Not Found: TeamNotFound: No team found with slug: old-team-name: https://provision.convex.dev/api/deployment/authorize_preview
11 replies
CCConvex Community
Created by CabalDAO on 9/27/2024 in #support-community
How can I run an action from a mutation function since they can't be http actions?
In a migration function which I've defined as either a mutation or an internalMutation, I need to run an action so I can run a fetch query. How can I run the action from a mutation or internalMutation so I can do ctx.runAction?
5 replies
CCConvex Community
Created by CabalDAO on 9/25/2024 in #support-community
Importing a snapshot during deploy stored on s3
Hi, my snapshot is now above 100mb. This means I can no longer commit it to github. Is there a way to tell the deploy command npx convex import --preview-name "$VERCEL_GIT_COMMIT_REF" ./data/mock-data/snapshot.zip during a deploy to tell it to grab the file from a remote resource, like an s3 bucket? What are workarounds for large snapshots that can't be commited to a repo?
27 replies
CCConvex Community
Created by CabalDAO on 9/25/2024 in #support-community
Mapping defined types to other defined types
I have two types:
export const ReferralOverviewStatus = v.union(
v.literal("new"),
v.literal("in_review"),
v.literal("needs_review"),
v.literal("accepted_awaiting_placement"),
v.literal("accepted_won"),
v.literal("accepted_lost"),
v.literal("bed_hold"),
v.literal("rejected")
);
export const ReferralOverviewStatus = v.union(
v.literal("new"),
v.literal("in_review"),
v.literal("needs_review"),
v.literal("accepted_awaiting_placement"),
v.literal("accepted_won"),
v.literal("accepted_lost"),
v.literal("bed_hold"),
v.literal("rejected")
);
And
export const DecisionStatus = v.union(
v.literal("accepted"),
v.literal("rejected"),
v.literal("needs_review")
);
export const DecisionStatus = v.union(
v.literal("accepted"),
v.literal("rejected"),
v.literal("needs_review")
);
As you can see, DecisionStatus overlaps with ReferralOverviewStatus. In one mutation, I accept an args type of DecisionStatus and I want to pass it to a mutation that accepts an arg type of ReferralOverviewStatus. I've tried a bunch of different things but I still get typescript errors for all of these. How can I make this work?
9 replies