Wasp-lang

W

Wasp-lang

Join the community to ask questions about Wasp-lang and get answers from other members.

Join

How do I prevent the api call from being run every time sate is changed, and only run on button pres

I would love some help on how I can make sure the api call is only run when the button is pressed and not every time state changes. I want to pass the state variables to the usetextstream function so that I can stream text from chatgpt to the frontend. But whenever any state changes the usetextstream function is run, this is creating a user experience where anything the user does makes an api call and starts streaming text. I would love if it only ran when the user clicks the generate social m...

Stripe production does not update user after purchase

For some reason when i moved over to production i chnaged my webhook to a production wbhook which i know works because it lets the user purchase things. it does not accuratly update the user to having an active subscription.

Service Worker Blocking Fetch Requests in PWA

Hi everyone, I've converted my WASP app into a Progressive Web App (PWA). I've successfully added the manifest and service worker. However, I'm running into a major issue: the service worker seems to be blocking fetch requests. Because of this, I can't get product analytics on PostHog, nor can I analyze the app in Lighthouse. I'm stuck and suspect it might be a cross-origin (CORS) issue, but I'm not sure....

How to add signup validation on backend

I have added new validation fields and rewrite the frontend version of signup proccess and now I am trying to add validation on backend in defineUserSignupFields but it does not work, how can I achieve validation on backend? Maybe there is a way overwrite just ensureValidArgs function? ``` function ensureValidArgs(args: unknown): void { ensureValidEmail(args); ensurePasswordIsPresent(args);...

sample code for reading a document from db and parsing it to json from the action

sample code for reading a document from db and parsing it to json from the action

TypeError: Cannot read properties of undefined (reading 'id')

I am having issues with creating an entity using nested relations in Prisma. I don't think this is a wasp issue but I wanted to ask to make sure. The only thing I am wondering about is in case I am missing some setup in the main.wasp file. Happening in file src/actions.js on https://github.com/ksk385/c2log-app...

This should never happen, studio should never stop.

``` [ Db ] Environment variables loaded from .env [ Db ] Prisma schema loaded from ../db/schema.prisma [ Db ] Prisma Studio is up on http://localhost:5555 [ Db !] node:internal/process/promises:289...

Network Error when adding authentication to todo app

Access to XMLHttpRequest at 'http://localhost:3001/auth/username/signup' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

How do you debug a whitescreen in wasp/react project?

When I write a code with mistakes, it gives me a whitescreen instead of the problem in the page. How can I debug such cases? I would like debug when there is problem in my code, however react/wasp gives me no error message and my GUI turns white.

How do you debug a whitescreen in wasp/react project?

How do you debug a whitescreen in wasp/react project?

Is there any contact us email integration?

I want to know if there is email integration, where user could send emails to the user over the website interface

User `postgresWaspDevUser` was denied access on the database

I try to use PostgreSQL database with docker. i have a terminal process in which i ran the command wasp start db. In another terminal, I started wasp with wasp start, but I get the following outputs: Terminal 1:...

Proper way to stop process

When I stop the wasp process developing locally(opensaas), using ctrl-c in iterm, the process keeps running in the background. What is the proper method for stopping the local dev env? Thanks!

Having Trouble integrating Supabase with Wasp

I am using a M2 Mac. I installed the wasp-lang installer using the curl command provided in the Getting Started Documentation. After that I created a new Wasp Project and selected the [3] SAAS option. It created my file and folder structure. I was able to open this up in VS Code and I was able to access the different sections. I went into the .env.server.example env file and renamed it .env.server. I then went to Supabase and created a postgres database. I copied the link from Project Settings>Database>Connection String>URI and pasted that in my .env.server file with the variable DATABASE_URL. ...

Errors with tsconfig

Hello! I am currently running the saas wasp template for the very first time and I faced this problem: ```
wasp db migrate-dev
...

Can't redirect after action taken

Im losing my marbles on this one. I'm using
useHistory
useHistory
from react-router-dom to try to redirect to 1 of 2 pages. But i can't get the redirect to work for the LIFE of me....

Should the `/login` route respect the `onAuthSucceededRedirectTo` when the user visits `/login`?

When the user first logs in from the login route, they are redirected to the path set in onAuthSucceededRedirectTo. However, when the user is already logged in and visits the login route path /login, they are redirected to /. I am using email auth if that helps....

Is it possible to use Qwik framework with wasp ?

Is it possible to use Qwik framework with wasp ?

SaaS Auth & Login

hi, I run the SaaS app locally. Everything looks fine. I try to sign up as a user, but then can't login. It complains: "Invalid Credentials". I try look in docs but don't see something for this. I am expecting on local, it allows a local stored Auth credentials and then I can test it. Perhaps I am missing something? Thanks!

Is there google autentication integrated with mail autentication in wasp?

I would like to add google autentication to my website too, is there a way to do that?