Wasp-lang

W

Wasp-lang

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

Join

Object relation doesn't compile to TypeScript

I have an explicit many-to-many relation that I want to display data. After migrating from version 0.11 to version 0.12, I can't find a way to display objects of my entity. Here is my schema: ` entity Material {=psl id Int @id @default(autoincrement())...

Failure to deploy client with Wasp CLI

I'm trying to deploy my app via the Wasp CLI (wasp deploy fly launch my-wasp-app mia), but the client always fails (see attached image). Only the server and db deploy successfully to Fly.io. It looks like someone made a PR with the same issue: https://github.com/wasp-lang/open-saas/issues/77...
No description

Using Cypress for end to end testing and getting a 401 error, not to sure why

I created a cypress test using cy.visit('http://localhost:3000') and im getting a 401 error. I used a sample test provided by the docs and that works
No description

Vito Error

Hi I’m getting this error when I’m trying to use multiple images for my bg for various breakpoints. “The request url “xxxx” is outside of Vito Serving allow list.” It won’t let me use my second image although it’s in the same directory as the first image....

Is there a detail tutorial to add pages and actions?

Hi, I'm new to opensaas, I set up everything, and it works, right now I'm trying to add new pages, and methods calling 3rd party APIs, and display the result, it cannot request directly from client side because of CORS issue, so I try to modify the server like actions, main.wasp, but I'm still bit confused, do we have like detailed tutorial how to add those? I checked wasp doc, still not clear, if we have some examples on top of opensaas, it would be great, thank you.

Is it possible to redirect traffic from Wasp's Post Requests?

Since there's no way to run code directly within Wasp upon signup or login, I've been trying to get around that while still keeping Wasp code untouched. I've created some custom code that I want to run on signup and I have it running on http://localhost:3002/auth/username/login. Wasp runs on port 3001 so usually the wasp request to that same endpoint would be at this link: http://localhost:3001/auth/username/login. When the post request is made to this link: http://localhost:3001/auth/username/login...

After migration flowbite-react is not working

I migrated from version 0.11 to 0.12. Following the steps, I managed to fix everything except for flowbite-react. I'm not sure if the issue lies with the library or my migration process, so I'll explain the whole process. First, I added Tailwind CSS by creating tailwind.config.cjs and postcss.config.cjs files. After that, I imported Tailwind CSS into the CSS file and enabled Tailwind to work. Following the documentation for installing dependencies, I installed flowbite-react with the command npm install -D flowbite-react. Then, I added the flowbite plugin to tailwind.config.cjs so it looks like this: ```javascript...
No description

useAuth() usage

I made significant progress on my app using wasp over the weekend. I thought I will ask this before implementing something naive. Here is what i trying to resolve. There are 2 pages. An order page and an upload page. Order page requires authentication, Upload page does not. I have a Navbar component shared by both pages because Navbar is in the Layout page. Navbar uses useAuth() to get user data and controls the rendering of the user dropdown (picture, edit profile, logout) Now when I access the Upload page, I see a browser console error - 401 Unauthorized even though I haven't set authRequired to true. Is this happening because I am using useAuth() incorrectly. Can you please help?...

fontsource not included in .wasp/out

I am using the @fontsource package to include google fonts and this was working just fine locally and on production. But since the migration to v.0.12 it is not working anymore locally. Vite complains with the following message:
The request url "/Users/path/to/repository/node_modules/@fontsource/roboto/files/roboto-latin-400-normal.woff2" is outside of Vite serving allow list.
The request url "/Users/path/to/repository/node_modules/@fontsource/roboto/files/roboto-latin-400-normal.woff2" is outside of Vite serving allow list.
...

Can I split up the main.wasp file into seperate files

Hey Everyone. I am really enjoying learning wasp and can easily see myself using this alot to make some of my web apps. I am just wondering is there anyway to split out the code in the main.wasp file into seperate files as I could easily see this file getting quite large and out of hand. What i mean is there a way to have a seperate file for all the routes (and maybe even break that until into sub routes), queries, jobs, actions, DB schemas. If not that would be a great thing for a future version of wasp to be able to do, would help with making the code abit more readable and manageable...

Update DB Field using Another Field

Hi! I'm looking for a way to update a database value by referencing the value of another field. See example below. It appears that this exists in standalone Prisma- is there a way to do it in wasp? context.entities.User.updateMany({ where: { // Something...

import actions into main.wasp

I am struggling with the following problem: I defined an action in the actions.ts but I get the message that it is not exported. In the Browser I get the message that the import of actions.js failed....
No description

Passwordless authentication

Do you support passwordless authentication out of the box? Similar to this: https://github.com/mikker/passwordless Thanks!...

How to integrate Django API Sign Up with Wasp

I have a standalone Django Rest API that has its own Sign Up and Login process and all that. I'm trying to make it so that when a new user is created in wasp and added to the prisma database, a post request is made to my Django API's User Create endpoint, so that I can create a user there as well. This will let me make authenticated requests to the API for other endpoints and purposes. However, I can't figure out how and where to add my code for the Django request. I could potentially modify the wasp LoginandSignupForm itself, but I'd rather not modify that code. If I were to just create an action to make this request, how would I incorporate that into the signup page, since the Signup Form component can't be modified directly in the SignupPage.tsx. ...

Tried to run open-saas on my Mac Mini M1, here are my thoughts:

So, a few weeks ago I discovered wasp via Mage and loved the idea behind it, and have been trying to make it work properly since then. Recently got invited to test again via a dev.to post and here I am, adding some comments: - 0.12 is a huge improvement, even after installing nvm I still had problems running wasp. Now at least the first steps are running 😛 - I tried open saas using /wasp new/, install was a bliss, but the steps to run it should be more clear. On medium and dev.to it seems that it's just a matter of executing /wasp start db/ and after executing it I got an error talking about docker not installed. I had to go all the way to the documentation and see how to "fix" it (I'm using quotes as it's not a bug per se, more a nuisance, more later); - OK, docker running locally, postgress installed, IT'S ALIVE! But... the sign up asks for "user" and "password" and later, when I try to buy something, nothing happens. Just after checking the logs I saw the error saying that I need to have an email o_O...
No description

Error when trying to run it on Raspberry PI 4b

So, when trying to install the new wasp version on my Raspberry Pi I got this error: /home/paulo/.local/bin/wasp: line 2: /home/paulo/.local/share/wasp-lang/0.12.3/wasp-bin: cannot execute binary file: Exec format error Usually I like to install things on my RPB and use other devices for coding (basically a local cloud :P) - is there an easy way to fix this?...

Accesing the database in pgAdmin

Wanted to ask can I acces the database of the open-saas template in pgAdmin? Currently the regular postgres account (name: postgres, password: postgres) is not working.

hi getting a [ Server ] POST /operations/stripe-payment 500 44.007 ms .

How to run wasp with more debug messages, also analyzing errors ?. like adding debug.log etc

Integrating Radix UI

Can you please provide directions on how to integrate Radix UI to the wasp app?

Using Sendgrid in test

Sendgrid always requires a url (not localhost) and does not accept API calls from my dev environment. Is there any test feature or workaround? Thank you very much!...