Wasp-lang

W

Wasp-lang

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

Join

What causes this rollup error?

What causes this rollup error when running wasp start? ``` [!] RollupError: src/server.ts (6:7): "default" is not exported by "../../../src/ServerSetup.ts", imported by "src/server.ts". [ Server!] https://rollupjs.org/troubleshooting/#error-name-is-not-exported-by-module [ Server!] src/server.ts (6:7)...

Can't set client environment when deploying to Fly.io

I've followed the docs https://wasp-lang.dev/docs/advanced/deployment/cli#client to set the client environment variable when deploying to fly.io I run REACT_APP_API_URL=https://api.myapp.com wasp deploy fly deploy But when it finished deploying to server and starts to deploy to client, it still execute below command...

Why doesn't console.log output anything to terminal?

I am trying to debug cors middleware setup. In main.wasp I have: ``` server: { setupFn: import setup from "@src/ServerSetup", middlewareConfigFn: import { serverMiddlewareFn } from "@src/ServerSetup"...

Getting the user in the rootcomponent

I specified the rootComponent for my client: ``` client: { rootComponent: import Root from "@src/client/Root", }...

Accessing/changing another entity when performing a db action

I'm new to NodeJS, prisma and the likes and am having some trouble implementing an action. When I create a Student, they need to get a number assigned to them. If there are already 10 students in the class, the next created student should get number 11. I'm not sure how to best do this. ...

Simple Api call to chatgpt

I have completed installing Open SaaS template and I start to play around with it. I found the AI Day Scheduler example quite difficult to me to understand. if it possible . if someone can create an example app that taking input from user ( as form , upload pdf ) and sending to chatgpt api to return the output of chatgpt that will display to user. i want to use the app within Open SaaS template to use " authintication as well I dont want to reinvent the weel

context.user is empty on api endpoint

export const fooBar = (req, res, context) => {
res.set("Access-Control-Allow-Origin", "*"); // Example of modifying headers to override Wasp default CORS middleware.
res.json({ msg: `Hello, ${context.user ? "registered user" : "stranger"}!` });
};
export const fooBar = (req, res, context) => {
res.set("Access-Control-Allow-Origin", "*"); // Example of modifying headers to override Wasp default CORS middleware.
res.json({ msg: `Hello, ${context.user ? "registered user" : "stranger"}!` });
};
...

Payload error

[ Server!] PayloadTooLargeError: request entity too large

Some General Questions

Hello, I have just stumbled upon Wasp recently, i must say it looks awsome and promising. Being an experienced full stack software engineer i have few questions. 1. How easy it is to shift to any newer version of Node.js or any other dependencies involved which creates the biolerplate code? ...

Worth Moving to the Current State of Open SaaS?

My project is nearing its end. I started about mid June. What do authors think? Are the changes going to add significant value / security / ease of use etc.? Effort would be migrating client, actions, main.wasp (already manually migrated to wasp 0.14), schema, package.json etc. basically I'd think it'd be mostly copy and paste. Opinions?

Wasp-lang is the 💣

I don't have any technical questions for the bot or for the team today. It's been a month of learning wasp-lang. My app is functional, deployed to production, and being sent out to some people for testing. I know of no higher compliment to offer. Y'all fawking rock! 😎

Payload too large

I am getting a payload too large error, directing me to this line: const response = await api.post(operationRoute.path, superjsonArgs) How can adjust the max payload size for uploads?...

An argument for 'context' was not provided.

I'm really struggling to understand this context that gets injected into api calls. I think I got all the configs straight (adding the right entities) in my main.wasp file, but I still get the context was not provided error message. How can I track down which part I am missing to make a call to an action get the context inlined?

Simple File Upload

Hey. What would be the simplest way to add a simple file upload? Like profile picture editing I know there's multer, but it doesn't seem like such a straightforward solution compared to the other features of wasp It would be nice if there was something simpler like Adonis' AttachmentLite....

Issue with @default([]) in schema.prisma during migration from Wasp 13 to 14

I am currently migrating our production application from version 13 to 14, following the migration guide. I’ve made all the necessary code changes, but when I ran the final command, wasp db migrate-dev, I encountered the following error: Wasp couldn't parse your schema.prisma file, please check if you have any errors in it. This was a puzzle to me because the same schema used to work when it was part of the main.wasp file. After some debugging, I ran the following prisma command to check if I would encounter the same error:...

Is Railway still recommended? I note the instructions do not track the Railway site

Example: the docs state that we "generate domain" on the Railway site as the first step. Now, when you go to Railway, this is not an option, apparently it is done after the Deploy step? Unknown, hence, checking before spending significant time on it..

Token questions

what are the docs on implementing tokens in opensaas products? how does it work

Docker Permission Denied when running "wasp start db"

Full Error Message: <USER>@DESKTOP-<stuff>:~/Projects/<saas-proj>/app$ wasp start db ✨ Starting a PostgreSQL dev database (based on your Wasp config) ✨ Additional info:...

Auth working on dev, not so on stage

App has been working, logging in/creating users works on dev, moving it to stage & now running into issues. I'm using the SaaS template & its default authentication. Now on both the /login and /signup routes, the action button is giving a 404. That's all coming from the <LoginForm> which is part of wasp. Who is supposed to be handling these /auth/email/signup and /auth/email/login routes? Why do they work on the dev environment, but are not there in prod?...