Wasp-lang

W

Wasp-lang

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

Join

Should the STRIPE_KEY in your environment variables be the Secret Key or the Public Key?

Should the STRIPE_KEY in your environment variables be the Secret Key or the Public Key?

[SOLVED]Monthly unlimited subscription not working

Hello again! I've set-up Stripe along with a test subscription to try out. The button from account and payment works well but my account state doesn't seem to be updating properly. Even after the subscription showed success my credits stayed at 0 in the account page and the GPT generator is not working due to insufficient credits. ...
No description

public media folder

I am making a job which generates images. After generating, I want them to be publicly accessible. Where is a good folder in project to place them so it will work? I'm planning to deploy on Fly

Queries/Actions type

Can I get generated type for context of queries/actions? Docs examples for them are in JS which ruins the following use of them on client. Currently there is example with self-defined types (https://github.com/wasp-lang/wasp/blob/release/examples/todo-typescript/src/server/serverTypes.ts) but it looks like temporary solution...

[SOLVED]Google Auth error while trying to set-up SaaS GPT Template

I've followed the starting guide but I can't seem to get it to work locally. My best guess is that it's not reading the env variables (yes, renamed). What could I do to fix this? Thank you!...
No description

Writing raw queries

Hi, is there a way to write a raw query? It seems like context.$queryRaw is not a function

[Solved] Server side relative import fails to find the file

I'm attempting to create utility style files for the server but unable to import them properly in the server files. Per the docs: https://wasp-lang.dev/docs/language/overview (has almost exactly what I'm attempting to do) ```...

[Solved] Tutorial: Auth redirect simply throws 500

I'm currently following along in the tutorial and got to the authentication step. I then migrated the database with the new User entity and copy/pasting the authentication pages. But now when I simply hit the "root" page / it doesn't redirect me to the login/signup pages. It simply hits the /me endpoint and throws a 500 error: HttpError not defined. The branch with this error can be found here: https://github.com/Kikketer/StorAI/blob/56b2c05be64be57bb370d2d3ec03a76119b40279/main.wasp#L11-L11...

Cannot log in

I followed the tutorial to set up authentication. The registration works, I can see the user in the database with the hashed password. I'm using username + password authentication. On the login page I'd enter the username and password but when I click login I'm not redirected to my landing page. ```...

I can't get Tailwind css working

Hello everyone! I'm trying to set up Tailwind css support in my first WASP project, but I can't get it to work. I have already added my "tailwind.config.cjs", "postcss.config.cjs" and "/src/client/Main.css" files. Has anyone gone through this? Can you give me any additional clues?...
No description

State management

I’m curious if there are thoughts of integrating some sort of state management framework?

Generating Components and Actions

I’m curious if it would be possible for wasp to automatically generate components and actions based on best practices?

How do you set the org slug when deploying to Fly.io

How do you specify what organization you want to deploy to in Fly.io when using wasp deploy fly launch my-wasp-app mia ? I tried the fly commands of -o and --org but neither worked. If I do not add the org, it is failing with this error: Error: org slug must be specified when not running interactively. I added a 2nd organization to my fly.io account because when I first tried, I received an error ` stderr: "automatically selected personal organization: Jonathan\n" + "Error: Validation failed: Name may only contain numbers, lowercase letters and dashes\n" +...

Hosting for SAAS Template

What is the best place to get cheap or free hosting for the SAAS template to try an idea I have?

How do I add additional products?

I am using the SaaS template and have the 'out of the box' subscription product working. I want to add an additional product option (like the one that exists on the PricingPage.tsx). Here is where my lack of recent dev experience shows. It appears like I would need to pass a var into the stripePayment() call on the PricingPage.tsx noting which button was clicked. And then update Server\Actions.ts to accept that var and update line_items as well as mode in the checkout session based on the details of that var....

What is the localhost stripe webhook URL?

Using the the wasp SaaS-Template-GPT. What is the URL the stripe webhook should point to? Trying to run this on localhost for now using the stripe CLI (docker).

pg-boss failed to start!

Hey guys, I'm pretty new to Wasp (first day) and also have little experience with Node.js. All my web experience was with Python (Flask). I installed Wasp and created a project based on SaaS, at first everything ran very well, I was able to configure the login through Google and everything worked perfectly. I went to restart the server and after that it keeps giving an error in pg-boss and it seems that it is not starting the node server....

Cannot build frontend part due to type error

As you can see on the screenshot, the error is coming from isolatedModules flag not used in tsconfig.json in /build/web-app dir. This prevents building frontend. What fixes this is either use import type { Route } from '../../types' or adding a "isolatedModules": false to /build/web-app/tsconfig.json. But those are manual editions to the output files that is not desired. Anything that can be done on source side? To reproduce, just generate a simple project and following Get started section, and try to build build/web-app folder. I don't know if I am the only one hitting this...
No description

Optional node_modules installs

I dunno why but for some reason I thought that Wasp detects npm installs and keeps track of them. Maybe cus of this file installedFullStackNpmDependencies.json but would it make sense for Wasp to track chances in package.json file and if there are any - only then do a npm install or have some sort of flag to disable the modules installation I was playing around yesterday with deployment to Railway, and I needed to do a few small changes in the source code (not .wasp folder) and build the codebase frequently afterwards and node_modules were installed every single time, whereas I think there might be a different way to do it. Like keep a ref to the dependencies and track any chances in there on each build command. If any detected - reinstall them entirely. If none - just delete everything apart from node_modules folder. Alternative approach, add a CLI flag to disable installs manually (might be easier and preferred way)...

Client Page component query parameter

On the following part of the doc: https://wasp-lang.dev/docs/language/features#accessing-route-parameters-in-a-page-component The doc is using jsx and not tsx (typescript), is it possible to have a type for the function to have typescript autocompletion in props ?...
No description