Wasp-lang

W

Wasp-lang

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

Join

When I made a custom api, I added user as an entity, but in the context it is empty

This is my main.wasp api socialPostMakerText { httpRoute: (POST, "/api/social-post-maker-text"), fn: import { getText } from "@src/server/socialMediaMakerPostText.js", entities: [User]...

Database migrations for production setup

What is the recommended way to update schema changes in a production setup? I'm assuming its migrations but I'm not sure if there is equivalent of "wasp db migration-dev" for production. Can you just run "wasp db migration-dev" for production? If so, in a docker setup, would you just ssh into the server instance and run it from there after you have deployed your new code?

useQuery error handling

I'm wondering why useQuery from wasp/client/operations doesn't handle errors as I expect. Consider the following: ``` // main.wasp query getApplicationById {...

Network error on Sign up after deploy on Fly.io

I have deployed to fly.io and it was working, it's deployed with a specific domain and the certificates are configured. Now a Network Error is ocurring. The browser says it CORS policy error (although I read in other posts here it could be for another reason). There is no error on server logs. I'd rather understand the issue instead of just redeploying....
No description

Json support

I'm trying to add lottie animation in my project and even if I provided the option to resolve json file, compilation process keeps failing saying that I need to enable the option. Here my tsconfig: ``` {...
No description

Translation

I'm building an app with your amazing tool but I was wondering if is there a way to change the default locale (english). I don't find any documentation about it and I saw that it was an opened issue. Do you plan to add it, do you need any help to make it available in french for example ?...

React Router missign hooks

I am trying to use my url has a state manager for some custom search in my app but for some reason some hooks are "missing" from the react-router-dom.... or I am probably doing something wrong. I want to get the search Params from it so I can sync the page content with it.......

[ Server!] NotFoundError: No DailyStats found

gettings this error, but i dont know if it is the same as https://discord.com/channels/686873244791210014/1253731262930223125 ? Did everything on this list : Got it now, there were three things: I had to use const PRIVATE_KEY = JSON.parse(Buffer.from(process.env.GOOGLE_ANALYTICS_PRIVATE_KEY!, "base64").toString().replace(/\n/g,"")) as per this comment I was encoding with single quotation marks, it should be echo -n ""-----BEGIN PRIVATE KEY---(...)"" | base64 ...

Scalability Questions

Hi, I'm building an app which handles some reasonably intensive requests on the server (pupetteer headless + LLMs + image editing etc). I'm not sure how wasp (wasp open saas specifically) will handle multiple concurrent requests. Would it be better to host these processes in a separate docker container, scale horizontally and make requests to the containers? From the documentation, I'm struggling to understand exactly how the applications are deployed. I know how to do it with the CLI tools, but...

Migration to 0.14 Issue with Prisma

My Auth is not recognizing the User field from my prisma file. Here is the main wasp declaration: app Realti { wasp: { version: "^0.14.0" }, title: "Realti",...

Error launching a new wasp project

HI! I'm starting to explore Wasp, but I've already come across a problem: simply trying to create a new project and run it with wasp start, I get these errors: anyone have any ideas? ``` 🐝 --- Starting compilation and setup phase. Hold tight... ------------------------ ...

todo list: server crashes

Tried replicating the todo list project and at first it ran and then it is crashing, is it some npm error because it is quite frequently happening. Please help me understand the error!:wasplang:...
No description

When i try to install opensaas and when i try to wasp db migrate-dev i get this

[ Wasp ] ext-src/admin/elements/charts/BarChart.tsx(95,9): error TS2353: Object literal may only specify known properties, and 'radius' does not exist in type '{ strokeColor?: string; strokeWidth?: number; fillColors?: string[]; shape?: ApexMarkerShape; offsetX?: number; offsetY?: number; customHTML?(): any; onClick?(): void; }'.❌ --- [Error] Your wasp project failed to compile: -------------------------------- SDK build failed with exit code: 2❌ --- [Error] Compilation of wasp project failed:...

What are the password requirements for users?

I have noticed that non safe passwords can't be used. What are the specific requirements for the passwords?

Module '"wasp/server/operations"' has no exported member 'scrapeArticles'.

Hey, I'm been having some trouble trying to resolve this bug related to a custom action that I'm trying to implement. I'm using the open Saas framework. Here's the line that giving me touble:...

Deployment Questions

Hi! I'm getting very close to deploying, and I have a few questions before I do. As a bit of context, I'm an experienced web developer but I've never launched my own application. 1. Updates: Is there a recommended way to push updates to the live version of the wasp application? Currently I'm hosting everything on github, and would like to use my main branch as the deployed version of the app. What's best practice here? 2. Prisma DB Studio access for deployed app. How would I go about accessing this to manage the data for my app? 3. Substituting NGROK. Currently, I'm using Ngrok to test my endpoints from a mobile version of my app, but I'll need to swap that out for whatever will replace my port 3000 and 3001. I'm not sure what to expect when I cross that road....

Migration to 14, should update auth field?

I am using OpenSaas. Right now I am working on migration to v0.14. I followed the guide on the docs, but now userEntity: User causes a type error on main.wasp (undefined identifier, because the entity is no longer on .wasp file I think). Besides Wasp v.0.14, I see changes to the OpenSaas code, such as @src/auth/email-and-pass folder and its code (which requires changes to the main.wasp), there are probably more changes. To get the most up-to-date code for my project, do I need to do anything oth...

Undefined email parameters

I created actions and everything but somehow this code send an email with undefined values(in below example inputSubject is undefined). import { emailSender } from 'wasp/server/email'; export const sendGUIMailRequest = async (inputName, inputEmail, inputSubject, inputPhone, inputEmailBody) => {...

migrate-dev failure when adding property to entity

Trying to perform a migration where I add an optional field to User, but since there already exist users in the DB the migration fails. For example: Migrating from: ``` entity User {=psl...

Reuse auth from wasp/opensaas in other apps

I plan to create an extension to complement my app. Has anyone done something similar or had a way to use the session/authentication of opensaas/wasp app auth