Sawyer Olson
Sawyer Olson3h ago

Convex in a monorepo package

I want to install convex as a package in my monorepo under packages/convex but when i run
bun convex dev
bun convex dev
it creates a subfolder called convex. Is there a way o have it create files in my current directory if I am in packages/convex?
4 Replies
Convex Bot
Convex Bot3h 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!
Jordan22
Jordan222h ago
Project Configuration | Convex Developer Hub
Configure your Convex project for development and production deployment using convex.json, environment variables, and deployment settings.
Sawyer Olson
Sawyer OlsonOP2h ago
When I add
"functions": "/",
"functions": "/",
and run
bun convex dev
bun convex dev
I get these errors but when I remove
"functions": "/",
"functions": "/",
everything works perfectly fine.
Unexpected Error: SyntaxError: 'from' expected. (14:31)
12 | import type * as convex__generated_api from "../convex/_generated/api.js";
13 | import type * as convex__generated_server from "../convex/_generated/server.js";
> 14 | import type * as node_modules_@better_auth_cli_dist_index from "../node_modules/@better-auth/cli/dist/index.js";
| ^
15 | import type * as node_modules_@better_auth_cli_node_modules_@clack_prompts_dist_index from "../node_modules/@better-auth/cli/node_modules/@clack/prompts/dist/index.js";
16 | import type * as node_modules_@better_auth_cli_node_modules_@clack_prompts_dist_index from "../node_modules/@better-auth/cli/node_modules/@clack/prompts/dist/index.js";
17 | import type * as node_modules_@better_auth_cli_node_modules_@clack_prompts_node_modules_@clack_core_dist_index from "../node_modules/@better-auth/cli/node_modules/
Unexpected Error: SyntaxError: 'from' expected. (14:31)
12 | import type * as convex__generated_api from "../convex/_generated/api.js";
13 | import type * as convex__generated_server from "../convex/_generated/server.js";
> 14 | import type * as node_modules_@better_auth_cli_dist_index from "../node_modules/@better-auth/cli/dist/index.js";
| ^
15 | import type * as node_modules_@better_auth_cli_node_modules_@clack_prompts_dist_index from "../node_modules/@better-auth/cli/node_modules/@clack/prompts/dist/index.js";
16 | import type * as node_modules_@better_auth_cli_node_modules_@clack_prompts_dist_index from "../node_modules/@better-auth/cli/node_modules/@clack/prompts/dist/index.js";
17 | import type * as node_modules_@better_auth_cli_node_modules_@clack_prompts_node_modules_@clack_core_dist_index from "../node_modules/@better-auth/cli/node_modules/
So if there is a way to fix that great but I have just compromised and set it to
"functions": "/",
"functions": "/",
so I am doing good.
Clever Tagline
In my monorepo, I went with packages/backend and then running npx convex dev in that folder created packages/backend/convex. This worked for me as I need to have more shared stuff in that package than just Convex. I first thought that I'd have one package for Convex and one for the other stuff, but combining them into the one backend package has worked out fine.

Did you find this page helpful?