Closed KevinWu098 closed 5 months ago
No idea why the deployment isn't working ðŸ«
Code looks good, but I haven't been able to run it because I need to set up the local server.
In this branch, can you add instructions for setting up the local db?
Also, the deployments are failing because
oslo
(used for password hashing inauth/register/+page.server.ts
) is dependent on a native module, which is messing with ESBuild. It's above my head, honestly, but I can't imagine why we'd need native functionality when it's just a SHA-256 hash.Sorry I've been dormant for so long.
I believe the setup should be the same as described by Adi in #71
Deployment worked! Huzzah! I ate your lunch a bit with #73 @MinhxNguyen7 -- needed to remove Prisma for the deployment 🫡
Looks good, other than the fact that I can't register. I just get this error without anything in the console.
Drizzle Studio does seem to indicate that I've set up the tables and DB:
Well, you're in this try catch:
try {
const isEmailAlreadyRegistered = await checkIfEmailExists(form.data.email);
if (isEmailAlreadyRegistered === true) {
return setError(form, "email", "Email already registered");
}
const userId = generateId(15);
const hashedPassword = await new Scrypt().hash(form.data.password);
await insertNewUser({
...
});
await createAndSetSession(lucia, userId, cookies);
} catch (error) {
console.error(error);
return setError(
form,
"email",
"An error occurred while processing your request. Please try again.",
);
}
If you have a moment, would you mind doing some good ol' fashioned console logs to check where the error is originating from? It works on my end, so I can't help too much w/ debugging w/o knowing what line is causing it 😅
It works now ¯(ツ)/¯.
Just address the
data
thing, and we can ship it.
must be one of those "off and on again" things :p
Summary
Progress
Resources:
Future Followup
Issues
Closes #69 Closes #65