Wasp-lang

W

Wasp-lang

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

Join

Wasp Railway Migrations

So my app is hosted on railway, they do not provide ssh access to their servers but I get the following error, my migration failed and when I follow the prisma link to resolve it it says to rollback the migration and fix it, how do I do that if I dont have access to the server? https://www.prisma.io/docs/orm/prisma-migrate/workflows/patching-and-hotfixing#failed-migration...
No description

Problem with cors out of no where

login:25 Uncaught SyntaxError: Unexpected end of input (at login:25:41)Understand this error login:1 Access to XMLHttpRequest at 'https://lecturelab-server.fly.dev/auth/me' from origin 'https://lecturelab-client.fly.dev' 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.Understand this error index-BZgIB584.js:57
...

Unknown at rule @tailwindcss(unknownAtRules)

I got this error and im trying to apply the Satoshi font and also getting some styles from Main.css but its no working, i can get the theme config from tailwind.config but not the rules from Main.css file. Im using opensass templante....
No description

OpenSaas setting up teams?

Can anyone tell me how difficult it is to set up teams and team subscriptions with the OpenSaaS template?

How do I create a page to display a single Task?

Taking the example 'todo' app as an example. How do I create a page to show a single Task? I've given it a go but I've hit a dead end! Using the example from https://wasp-lang.dev/docs/tutorial/pages I have the following but have no idea how to use RouteComponentProps. In main.wasp I have: ```...

Is it good practice to call an action in a job in wasp?

I have several processes in my app that normally run on cron jobs, but sometimes I want to click a button to run them manually via an admin dashboard (both for testing and for their actual functionality). Is it good practice to just create an action, and call it both from the front end and in a job?

Blog Questions

How do I change the style of the blog in opensaas?

client not working when visit port 3000

Hello all! Just learning NextJS, coming from Astro. Decided to give this stack a shot based on research and all the features. I got Docker running on a Ubuntu VPS. After running “wasp start” everything starts fine. When I visit my IP:3000, it’s just a blank page that does not load and I get connection timed out. Any ideas?

How can I display the user's credits on the navbar ?

How can I display the user's credits on the navbar with open saas template ?

Problems with operations

I am trying to set up a simple crm foundation. I have added the schema entries and updated schema, i have added the routing and queries/actions to the wasp file, making sure to use the proper pathing - "@src/crm/operations" and routing: route CRMRoute { path: "/crm", to: CRMPage }...

Local file access in Query

Is it possible to read a local file in a query implementation defined in operations.ts ?

How to deploy existing wasp app to Electron for desktop application ?

HI, I have built a react app by using wasp SaaS method. I can run and use it by using browser and wasp commands. However, i have to deploy this application to desktop environment to make it downloadable and local. There are multiple feature such as AWS lambda calls in my app. I have install and create basic electron app but I don't know how to combine or move my app into this electron app. The folder structure and other stuffs are different than the vanilla react app and electron app therefore i...

Best way of adding a 404 page?

What's the optimum way of adding a 404 page to my wasp app - should I take the react router standard approach of a wildcard match as the last route listed?

Where is the complete API Reference in Open-Saas documentation / project?

I'm trying to understanding more about how the authentication providers works in open-saas. Because I want to get the refresh token of my google auth so i can reuse it in my backend app to access other libraries. Do you guys have something documented about this? I tried ```js export const onAfterLogin: OnAfterLoginHook = async ({ providerId, user, oauth, req}) => {...
No description

AWS file upload query cache invalidation after creation

Using version 0.14.2 on MacOS I have a query to get a team ``` query getTeamById {...

what is in essence the difference between a query and action

I have both queries and actions. I dont really understand the difference. Sometimes an action of mine checks if something exists in database and if it does it returns the already existing value and otherwhise it calculates it and appends it. Is this proper?...

Use another Database on Development

I have Docker running and I have several branches of my app. There are some variants in which I have to do wasp db migrate-dev and as there are fields that do not exist and others disappear, that database is completely deleted and when using the previous branch I no longer have data. How can I solve this? Is it possible to have several databases running in docker at the same time?...

Modify data in `onBeforeSignup` hook

Pretty much the title. Is this possible? My signup flow requires a key linked to a third party service, and the goal was to gather data via that service's API before inserting it into the database. I've got properties on my User model that I don't include in my auth flow for obvious reasons - what's the go here? Is there a good option here besides making the data optional and inserting it in an onAfterSignupHook instead? I presume I'll need to hit the api twice if so - once in onBeforeSignup to verify, and once again in onAfterSignup to add additional properties....

Can't make onAfterLogin work

Hello, I updated wasp because I need this specific hook in my project but I really can't make it work. Here is my app/src/auth/hooks.ts file:...