StarLord
StarLord2mo ago

How can I use baml client in convex function?

I have 'use node'; in file where i use the client and my convex.json is as follows
{
"functions": "src/convex/",
"node": {
"externalPackages": [
"@boundaryml/baml"
]
}
}
{
"functions": "src/convex/",
"node": {
"externalPackages": [
"@boundaryml/baml"
]
}
}
I am not able to deploy my convex function with baml client due the following error
Loading the pushed modules encountered the following
error:
Uncaught Failed to analyze workflows/agents.js: Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
Loading the pushed modules encountered the following
error:
Uncaught Failed to analyze workflows/agents.js: Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
I get the following error after I clear node modules and lock file and try to deploy
Loading the pushed modules encountered the following
error:
Uncaught Failed to analyze workflows/agents.js: Cannot read properties of undefined (reading 'fromFiles')
at <anonymous> (../../src/baml_client/globals.ts:30:4)
Loading the pushed modules encountered the following
error:
Uncaught Failed to analyze workflows/agents.js: Cannot read properties of undefined (reading 'fromFiles')
at <anonymous> (../../src/baml_client/globals.ts:30:4)
Is there a way to run baml client in convex function?
1 Reply
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!

Did you find this page helpful?