Wasp

W

Wasp

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

Join

I'm getting this error when deploying my server to Railway

file:///app/.wasp/build/server/bundle/server.js:12 import cheerio from 'cheerio'; ^^^^^^^^^^^^^^^^ SyntaxError: The requested module 'cheerio' does not provide an export named 'default' at ModuleJob._instantiate (node:internal/modules/esm/module_job:122:21)...

When deploying to Railway, I'm getting this error:

89 migrations found in prisma/migrations Error: P3009 migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve...

Wasp TypeScript configuration - Split Wasp file

I remember having seen in some thread that with the Typescript config you can split the main.wasp into several. I can't find it, Give the COMPLETE steps 1 by 1....

How to refresh table data after deleting a record in Wasp?

Hey! I'm using Wasp with a table UI that lists records from a query. When I delete a record via a button in the table, the record is removed from the database, but the table UI doesn't update automatically. What’s the recommended way to ensure the table reflects the updated data after deletion? I'm using the default query (e.g. getTasks) and deleteTask action. Should I manually invalidate the query with React Query's queryClient.invalidateQueries, or is there a more idiomatic way to handle this in Wasp? Perhaps there is something wrong with the entities I defined in main.wasp?...

Accidentally cooked my db, start fresh from latest migration?

Hi all, I accidentally cooked my db again lmao, oops.. I had some migrations testing some stuff out, but accidentally really messed it up and deleted migration files by reverting with git, blah blah blah, here I am now, I THOUGHT I fixed it by running "wasp db reset" and doing a new "wasp db migrate-dev", but after changing the schema.prisma again and running "wasp db migrate-dev" again, it was saying:
Could not find the migration file at /srv/web/shelter/app/.wasp/out/db/migrations/20250414202957_video_migration/migration.sql. Please delete the directory or restore the migration file.
Could not find the migration file at /srv/web/shelter/app/.wasp/out/db/migrations/20250414202957_video_migration/migration.sql. Please delete the directory or restore the migration file.
...

Puppeteer error

I get this error when I try to run my action with puppeteer code: Error: Could not find Chrome (ver. 135.0.7049.84). This can occur if either.. Already ran "npx puppeteer browsers install chrome" In another node.js project I have the code working, but not in my wasp project....

How can I implement "live" UI updates based server-side results.

I have a setup in my WASP project where a user clicks a button, and my app sends data from the WASP server to a separate Node endpoint. Each request includes a JobID (representing the batch) and multiple subtaskIDs (mapped to individual database entities). I’ve set up a webhook in my WASP app to receive results from the Node server. The webhook invokes various server actions to updates the DB accordingly and tracks the status of the JobID and each subtaskID. Now, I want certain components in the UI (the ones initiating the batch) to subscribe to these updates, ideally in realtime so that I can reflect the status/result of each subtaskID as it completes, without needing to refresh or rerender the entire page....

Changing favicon for OpenSaaS blog

How do I change the favicon for the Astro blog in the OpenSaaS template?

production stripe webhook secret

Should the stripe webhook secret (STRIPE_WEBHOOK_SECRET) change for production? Test stripe webhook worked but when testing outside of testmode in production app doesnt seem to be able to detect webhook once payment goes through

Network Error

I get network error when I try to create a new account

Using ssl cert references in DATABASE_URL leads to pgBoss requiring custom cert env data

Im providing a custom ssl cert to the wasp app for postgre connections, which works fine with prisma. The issue arise when pgBoss needs to connect with custom ssl cert, as it is not configurable via the DATABASE_URL like prisma, but instead requires the environment variable PG_BOSS_NEW_OPTIONS to be set with a specific json structure containing binary cert data. This is not secure, and frankly unmanagable. How can this be worked around professionally (without having to manually edit pgBoss.ts file in production)?...

Wasp app behind reverse proxy does not request correct server url

Im using a custom docker stack with two containers, one node and one nginx with static app files and they are properly built and setup inside their respective containers with all necessary environment variables etc and this setup works for a locally built app with the proper backend urls - like so: https://internaldomain.com/srv/. When deploying to an external host, the frontend static files want to connect to http://waspbackend/auth/me which is the upstream internal target host. I'm curious why my backend seem to provide its internal host name to the frontend, when I have clearly set the url with REACT_APP_API_URL during the build step of the wasp node app. As my current deployment method is seemingly unusual, maybe there is something Im doing wrong here? Please advice....

wasp start for first app

I built my first saas based wasp app per the instructions, ran it with wasp start and it displayed an error at the end (but the app seems to be up). The following was displayed at the end. Why is this happening?
[ Server ] Starting pg-boss... [ Server ] pg-boss started! [ Server!] Port 3001 is already in use...

Style

How do I change the font in the login and signup page which use stitches and are in the wasp.out dir

Fly Prod Deploy - ...not listening on the expected address and will not be reachable by fly-proxy.

I have seen the below error as I run wasp deploy fly deploy (both initially + subsequently). It seems like my app is working fine but wonder if this is an issue I need to address. I have not manually changed any of the fly-client.toml or fly-server.toml, which shows internal_port of 8043 and 8080 respectively since they are automatically generated, which I believe contributed to this issue. Per Fly's troubleshooting doc, it looks like I would need to update the toml docs, but before I do that I want to make it won't mess with anything as those files are currently automatically generated....

Deployment issue on Railway

I'm experiencing an issue with my Wasp app deployment that started after the recent Railway update (April 4 changelog). My app was working fine before, but now deployments are failing with this error: pg-boss failed to start! error: role "u9o4bahro8glkv" is not permitted to log in The strange thing is, when I check my database using \du and SELECT rolname, rolcanlogin FROM pg_roles;, this role doesn't exist in my database at all. The only role with login privileges is "postgres", which matches my DATABASE_URL connection string (postgresql://postgres:[email protected]:XXXX/railway)....

Best approach for associating pre-registration data with user accounts after Email/Password + social

Hello everyone, I need some advice on the best procedure to implement this functionality: I'm developing a system where users answer questions before registering. The responses are saved in the database with a temporary ID generated by the client and stored locally. Later, when the user completes registration (using Email & Password or social login methods), I want to associate those previously saved responses with the newly created user account. What's the most correct way to handle this association? ...

Cannot find module

Hello i am trying to run a migration to an existing project that is newly installed on my laptop and keep getting errors such as: [ Wasp ] auth/useAuth.ts(8,32): error TS2307: Cannot find module '@tanstack/react-query' or its corresponding type declarations. [ Wasp ] client/operations/hooks.ts(9,8): error TS2307: Cannot find module '@tanstack/react-query' or its corresponding type declarations. [ Wasp ] client/operations/queryClient.ts(1,48): error TS2307: Cannot find module '@tanstack/react-query' or its corresponding type declarations. [ Wasp ] client/test/vitest/helpers.tsx(7,50): error TS2307: Cannot find module '@tanstack/react-query' or its corresponding type declarations....

Login user through the backend

Is there a way to trigger user login through a server side(backend) login function? My usecase is that I have a wasp app running in an iframe of a parent app and I want a user to login if a certain user role is passed from the parent app to the wasp app.

Disable login for a user after X number of failed attempts

Wasp version: 0.16.3 Platform: macOS I'm looking for a way to disable logging in for a user that has 3 or more consecutive failed login attempts. ...