Jolo
Jolo•5mo ago

Issues when setting up the auth in an existing project

I tried to setup the Convex Auth to an existing react app but run into issues regarding tsconfig configuration. It says:
convex/schema.ts:1:30 - error TS2792: Cannot find module 'convex/server'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

1 import { defineSchema } from "convex/server";
~~~~~~~~~~~~~~~
convex/schema.ts:2:28 - error TS2792: Cannot find module '@convex-dev/auth/server'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

2 import { authTables } from "@convex-dev/auth/server";
~~~~~~~~~~~~~~~~~~~~~~~~~
convex/tsconfig.json:10:25 - error TS6046: Argument for '--moduleResolution' option must be: 'node', 'classic'.
10 "moduleResolution": "Bundler",
~~~~~~~~~
Found 6 errors.
convex/schema.ts:1:30 - error TS2792: Cannot find module 'convex/server'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

1 import { defineSchema } from "convex/server";
~~~~~~~~~~~~~~~
convex/schema.ts:2:28 - error TS2792: Cannot find module '@convex-dev/auth/server'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

2 import { authTables } from "@convex-dev/auth/server";
~~~~~~~~~~~~~~~~~~~~~~~~~
convex/tsconfig.json:10:25 - error TS6046: Argument for '--moduleResolution' option must be: 'node', 'classic'.
10 "moduleResolution": "Bundler",
~~~~~~~~~
Found 6 errors.
` Here my codesandbox: https://codesandbox.io/p/devbox/c52yx6?migrateFrom=pkwz3m&embed=1&file=%2Fpackage.json
2 Replies
ballingt
ballingt•4mo ago
When I fork the sandbox there's no problem
Jolo
JoloOP•4mo ago
Weird 😄

Did you find this page helpful?