After moving from Clerk to Convex-Auth my convex tests fail
I'm pretty sure that everything in convex folder is fine,
convex dev
does not report any problems. But all my tests are now failing with this import error:
I'm probably missing something obvious? Already wiped my node_modules and reinstalled all dependencies, but no bueno.28 Replies
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!
Is it possible you have two versions of @convex-dev/auth between your tests and your main project? Are you on a monorepo or do you have a single package.json for your whole repo
I'm having the same problem haha WHAT
in the same second.
Its all in one normal repo with one package.json. I do have a dedicated Typescript config in the convex dir though... Could this be a problem? I think I don't really need it.
π
Ha π
What, we're in the same repo π
just kidding.
Convex requires that config, it's needed
I will provide an example
Can you run
npm ls @convex-dev/auth
and see if there's more than one version resolving, and also see exactly what version you're on in the output@edproton can you share the exact error you're seeing (I understand it's similar or same as OP)
I'm on my mobile, will do that when im home
is the same, sorry for "stealing the thread" @TripleSpeeder
No worries mate. Hope you guys sort it out until im Home π
Haha, alright, give it a shot, mateβappreciate it!
awesome, I just reproduced
Good. Let me know if you need any additional input or further details @erquhart
I believe @ballingt is the maintainer of
convex/auth
, but I'm not entirely sure if the issue is with convex/auth
or convex/test
.Files are all there, the only difference I see is the other imports specify the js extension and the checks import doesn't. But I built and linked it locally and everything worked fine. I even diffed the locally built dist to the published one, no difference. But maybe explicitly adding the extension for that import will fix π€·ββοΈ
https://github.com/get-convex/convex-auth/pull/141
was able to reproduce by publishing built package to npm, really not sure why the difference, but the fix makes the buggy import consistent with other imports.
Nice find, we'll get a release with that fix in soon
What are the "moduleResolution": "node"/"bundler"/"node16" values everyone with this issue has in their tsconfig.json files?
That makes sense, that import was recently added
I have "Bundler" for my root and convex configs
convex-test has some specific requirements, this makes sense
or rather the way we suggest you run tests does I think
I also have "bundler".
Just published
@convex-dev/auth@0.0.77
with this fix.I have
"bundler"
too.
Thanks @TripleSpeeder @erquhart and @ballingtThank you @ballingt , works fine now. I really love the support here, always competent and super fast, no matter if it's weekend. You guys are π