Convex Auth problem after bunx @convex-dev/auth
Following https://labs.convex.dev/auth/setup#run-the-initialization-command to use Convex Auth, ran into problem at step 2. I was using bun and bunx, is that a problem? I actully tried both npm and bun, the same two problems. One is after Step 2: Configure private and public key
node:internal/errors:984
const err = new Error(message);
^
Error: Command failed: npx convex env set -- JWT_PRIVATE_KEY '-----BEGIN PRIVATE KEY----- -----END PRIVATE KEY-----' at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at checkExecSyncError (node:child_process:889:11)
at execSync (node:child_process:961:15)
at setEnvVar (D:\Project\convex-auth\node_modules@convex-dev\auth\dist\bin.cjs:40412:37)
at configureKeys (D:\Project\convex-auth\node_modules@convex-dev\auth\dist\bin.cjs:40401:9)
at async Command2.<anonymous> (D:\Project\convex-auth\node_modules@convex-dev\auth\dist\bin.cjs:40337:3) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 29876,
stdout: null,
stderr: null
}.
Set Up Convex Auth - Convex Auth
Relations, default values, unique fields and more for Convex
20 Replies
The other one is shown in the screenshot
Can you fix the typescript errors, or share some code so we can help you fix them?
I'm not sure why setting the env variable is throwing an error, but it might be related to the push failing.
The second one can be fixed with having
"ES2023.Array"
in your convex/tsconfig.json
"lib"
For the first:
Can you run the npx convex env ......
command from the CLI? Do you get an error?
What's your Node/Bun/OS version?Thanks, the second one is fixed. I tried again, the same problem. node v22.1.0, bun v1.1.17, Windows 10 Pro 22H2. run the npx convex env doesn't get an error
Thanks, it's all the official template generated by Convex, I didn't type any code.
Are you using WSL?
No
You need to use
convex env set key="value"
(using =
and with "
). It treats the dashes as flags and fails.The command uses
--
to avoid that problem. But this must be some windows-specific quoting bug.Mhm, think I had the same problem on Ubuntu, I'll probably try to set up auth again soon... keep pushing it forward 🥲
@Rope-a-dope it was indeed a bug with quoting of the arguments on Windows. Please upgrade to
@convex-dev/auth
to 0.0.32. Thanks for reporting the bug.Thank you so much! I am glad that I can help with the development.
I used the example repo. Signed up with Google and Email + Password Verification, tried to reset my password, but got error: "could not send code". The error on Convex log is "
Uncaught Error: Uncaught Error: Provider resend-otp-password-reset is not configured". But how, I received the verification code in my email when I signed up.
I tried with only email + password reset, the same error.
ResendOTPPasswordReset seems to be the problem
@Rope-a-dope fixed in
0.0.35
, thanks for the reportMy pleasure, so what's the problem
There deprecated warnings are OK? npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
When the resend key is not set and user tries to sign up, the message shows: "Could not sign up, did you mean to sign in?" And it still creates an acccount in authAccounts, is this right?
Already upgraded to 0.0.35 and pulled the latest repo, the same error occured when tried to reset password. 'Provider resend-otp-password-reset is not configured'
The deprecated versions are from older eslint, Vite is working on upgrading. Nothing to worry about.
Also, when sign in, the 8-digit code page shows momentarily
Tried many times. Still the same error when resetting the password. The provider is passed as "password-code". Why error "Provider resend-otp-password-reset is not configured"
Hey sorry @Rope-a-dope , this is fixed in v0.0.36
Thank you so much! Reset password works now.
Growing pains, appreciate your patience and feedback!
But when sign in, the 8-digit code page shows momentarily. I think the reason is because when sign in, "forgot" is set, but sign in takes time so shows "forgot" page.
I'm glad can help. I am new to Frond-end dev, but I really like Convex and I think Convex is the future because not only the product is great, but also all those engineers like you are awesome.!
Tracking that already in https://github.com/get-convex/convex-auth/issues/29
GitHub
Block
signIn
function on completed signIn
· Issue #29 · get-con...Right now there's a delay between signIn finishing and the client authenticating. This leads to a visible "bug" for email+password requiring verification: Sign up Verify Log out Sign ...