BeReal
WWasp
•Created by BeReal on 1/12/2025 in #🙋questions
ERR_MODULE_NOT_FOUND problem with config
When I do
import { config } from 'wasp/client'
I get a problem with code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///Users/bereal/wasp_project/app/.wasp/out/sdk/wasp/dist/client/config'
Has anyone faced that before?
13 replies
WWasp
•Created by BeReal on 12/27/2024 in #🙋questions
stripe webhook
I am in the process of trying to deploy but running into an issue with my stripe webhook.
Locally when testing I was running stripe listen --forward-to localhost:3001/payments-webhook and this was working correct.
I have tried following the docs and creating a https://myapp-server.fly.dev/payments-webhook and https://myapp-server.fly.dev/stripe-webhook. I have selected the correct events to listen to but in my server logs i can see it is not working correctly. I also updated my STRIPE_WEBHOOK_SECRET env var, what else could I check or be doing wrong?
7 replies
WWasp
•Created by BeReal on 12/24/2024 in #🙋questions
Google auth deployment on fly
I have been having some issues with getting google auth working on fly deployments, it was working locally, now when I test locally I get to see the login screen but when I login with google it just hangs, when I go to my online version I dont even get to see the login screen.
I have set the WASP_SERVER_URL to my fly.dev url
and the WASP_CLIENT_URL to my custom domain name
I have set these both in my .env aswell as usting flyctl set secrets
Does anyone know what still could be going wrong? It is difficult to debug as I do not know where to look the window just hangs and I do not see anything in the console, should I be looking someplace else?
7 replies
WWasp
•Created by BeReal on 11/24/2024 in #🙋questions
Get email from user auth by google
Hi I just have Google Auth activated as a means of authenticating, how can I get the e-mail?
import type { GenerateCheckoutSession, GetCustomerPortalUrl } from 'wasp/server/operations';
import type { FetchCustomerPortalUrlArgs } from './paymentProcessor';
import { PaymentPlanId, paymentPlans } from '../payment/plans';
import { paymentProcessor } from './paymentProcessor';
import { HttpError } from 'wasp/server';
export type CheckoutSession = {
sessionUrl: string | null;
sessionId: string;
};
export const generateCheckoutSession: GenerateCheckoutSession<PaymentPlanId, CheckoutSession> = async (
paymentPlanId,
context
) => {
if (!context.user) {
throw new HttpError(401);
}
const userId = context.user.id;
const userEmail = context.user.email;
if (!userEmail) {
throw new HttpError(
403,
'User needs an email to make a payment. If using the usernameAndPassword Auth method, switch to an Auth method that provides an email.'
);
}
const paymentPlan = paymentPlans[paymentPlanId];
const { session } = await paymentProcessor.createCheckoutSession({
userId,
userEmail,
paymentPlan,
prismaUserDelegate: context.entities.User
});
return {
sessionUrl: session.url,
sessionId: session.id,
};
};
export const getCustomerPortalUrl: GetCustomerPortalUrl<void, string | undefined> = async (_args, context) => {
if (!context.user) {
throw new HttpError(401);
}
return paymentProcessor.fetchCustomerPortalUrl({
userId: context.user.id,
prismaUserDelegate: context.entities.User,
});
};
Here I get the error:
User needs an email to make a payment. If using the usernameAndPassword Auth method, switch to an Auth method that provides an email.
How could I get the email from the user here?
20 replies
WWasp
•Created by BeReal on 10/3/2024 in #🙋questions
syntax of importing from wasp
Hi I am pretty newbie to typescript and wasp, I have python experience though. I was asking chatgpt to create a simple function to try and call my python backend. I am in the process of combining them.
chatGPT suggested this, but I cant import like this its giving errors on running
wasp start
. Is chatGPT completely wrong or am I doing sth wrong, where can I find some documentation on how to do this correctly8 replies
WWasp
•Created by BeReal on 9/27/2024 in #🙋questions
Waspello example
I am trying to run the waspello example but am getting a bunch of errors:
[ Wasp ] auth/providers/types.ts(11,37): error TS2694: Namespace '"/Users/b2077/PycharmProjects/waspexample/waspello/.wasp/out/sdk/wasp/node_modules/.prisma/client/index".Prisma' has no exported member 'UserCreateInput'.
[ Wasp ] auth/utils.ts(132,17): error TS2694: Namespace '"/Users/b2077/PycharmProjects/waspexample/waspello/.wasp/out/sdk/wasp/node_modules/.prisma/client/index".Prisma' has no exported member 'AuthWhereInput'.
[ Wasp ] auth/utils.ts(193,27): error TS2339: Property 'PrismaClientKnownRequestError' does not exist on type 'typeof Prisma'.
[ Wasp ] auth/utils.ts(193,62): error TS2339: Property 'code' does not exist on type 'unknown'.
[ Wasp ] auth/utils.ts(199,27): error TS2339: Property 'PrismaClientValidationError' does not exist on type 'typeof Prisma'.
[ Wasp ] auth/utils.ts(210,27): error TS2339: Property 'PrismaClientKnownRequestError' does not exist on type 'typeof Prisma'.
[ Wasp ] auth/utils.ts(210,62): error TS2339: Property 'code' does not exist on type 'unknown'.
[ Wasp ] auth/utils.ts(221,27): error TS2339: Property 'PrismaClientKnownRequestError' does not exist on type 'typeof Prisma'.
❌ --- [Error] Your wasp project failed to compile: -------------------------------
- SDK build failed with exit code: 2
any clue what is going wrong?
13 replies
WWasp
•Created by BeReal on 9/21/2024 in #🙋questions
Google OAuth help
Hi I am a bit stuck, I am using the Saas Template and trying to add Google OAuth, I have followed all the steps in the documentation but am stuck probably due to my lack of experience. I am trying to test locally the OAuth I have added localhost as a redirect uri in my google cloud console. When I click sign up with google I get redirected to http://localhost:3001/auth/google/login where I get a refused to connect error. If i change the port to 3000, i do not get the error but just nothing happens.
I have two questions what is going on with the 3000 and 3001 ports, should I specify the ports somewhere?
Secondly, what could be the reason my google oauth is not working?
9 replies