DCsanD
Convex Community3y ago
9 replies
DCsan

typescript and src/

just getting started with adding to a TS project and stuck right away

when I run npx convex dev it creates a convex/_generated in the root level of my project.
Instead i keep all my TS code in src/

I tried adding a symlink inside src/convex to the root level _generated

 tree src/convex/
src/convex/
├── README.md
├── _generated -> ../../convex/_generated
├── getCards.ts
└── tsconfig.json


but getting:
Error: Could not find public function for 'getCards'. Did you forget to run `npx convex dev` or `npx convex deploy`?

(the convex dev script is running)

is there some other magic I have to set?

I note there's also a tsconfig inside the convex dir, with
  "include": ["./**/*"],
  "exclude": ["./_generated"]

I wonder if that will conflict with the rest of my app?

also noting the .js files are side by side in the convex output, whereas I usually build all to /dist before deploying.

using /src and /dist is fairly standard for a TS project, so maybe I'm missing something why I can't get started
Was this page helpful?