Wasp-lang

W

Wasp-lang

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

Join

resource exhausted (Too many open files)

This is not the first time that this happens, for some still unknown reason, when doing any file change, instead of recompiling as it should, my wasp start stops and throw a resource exhausted (Too many open files) error. I tried wasp clean but didn't work. My project is totally unusable, any change I do breaks wasp start It's a haskell error, but I'm not sure why it's happening....

Stripe payment refund

First of all, thank you to this fantastic community for all the hard work. I have a question regarding the payment process using Stripe. I see that we can allow users to subscribe to a plan, but what happens if a user wants to request a refund? How can that be handled?

Job Hanging/Not Working when processing a large loop

I'm running a job on my database that current involves iterating over 800 elements and making an api call on each one, but it never gets past the first iteration, and nothing logs out. Is there anything it looks like I'm doing wrong? I've cut out some parts of the code to save on message length restrictions (mainly irrelevant variables) ```export const updatePlatformStats = async (_args, context) => { const unverifiedUsers = await context.entities.UnverifiedUser.findMany({ where: {...

Page & Route specific metadata

Hey guys, currently the <meta /> tags are defined in the main.wasp file. Is there a way to define these metadata (eg. title and description) separately for each route dynamically? Thanks!

pinecone

Hey Guys currently trying to get the embeddings sample to run but i keep getting error connections with pinecone. I followed https://github.com/wasp-lang/starters/pull/11/files and changed the files needed but still get : [ Wasp ] ext-src/embeddings/generateEmbeddings.ts(192,7): error TS2353: Object literal may only specify known properties, and 'spec' does not exist in type 'CreateIndexOptions'. [ Wasp ] ext-src/embeddings/utils.ts(6,23): error TS2345: Argument of type '{ apiKey: string; }' is not assignable to parameter of type 'PineconeConfiguration'. [ Wasp ] Property 'environment' is missing in type '{ apiKey: string; }' but required in type 'PineconeConfiguration'. any solutions for this?...

Added shadcn, and now app won't start

[ Wasp ] ext-src/components/foldable-list.tsx(3,24): error TS2307: Cannot find module '@/components/ui/button' or its corresponding type declarations. [ Wasp ] ext-src/components/foldable-list.tsx(4,26): error TS2307: Cannot find module '@/components/ui/checkbox' or its corresponding type declarations. [ Wasp ] ext-src/components/foldable-list.tsx(5,26): error TS2307: Cannot find module '@/components/ui/progress' or its corresponding type declarations. [ Wasp ] ext-src/components/foldable-list.tsx(18,7): error TS2395: Individual declarations in merged declaration 'FoldableList' must be all exported or all local. [ Wasp ] ext-src/components/foldable-list.tsx(97,17): error TS2395: Individual declarations in merged declaration 'FoldableList' must be all exported or all local....

Generic type can not be seen while using wasp/client/operations

I have created a function that in db/operation.ts and i am using it in routes/informationPage.tsx like "import {getTableData} from 'wasp/client/operations'; Thats meaning i am calling this function through the wasp. In operations.ts file the function is written like " interface getTableDataProps<T> { ........ };...
No description

Bug?: `wasp start` reinstalls dependencies after stopping

When I make a change with wasp and everything is OK, it immediately recompiles without any problem. When I make a change and something is wrong, it gives me the error, I fix it and it recompiles again without any problem. The problem is when it tries to compile something that is wrong, so it gives me back correctly an:...

Add credits to each subscription

How to add monthly credits based on the subscription? Without affecting user credits in case they bought extra credits

is it good practice to call an action from an api?

is it good practice to call an action from an api? If so, should it be done?

delete entity

I have an entity called File which has an id. Give me an example action to delete a File

Error while compiling the project

[ Wasp ] prisma-runtime-library.d.ts(2,26): error TS2307: Cannot find module '@prisma/client/runtime' or its corresponding type declarations. [ Wasp ] server/_types/index.ts(6,8): error TS2307: Cannot find module 'express-serve-static-core' or its corresponding type declarations. [ Wasp ] tsconfig.json(2,14): error TS6053: File '@tsconfig/node18/tsconfig.json' not found. [ Wasp ] ../../../../node_modules/@testing-library/jest-dom/types/jest.d.ts(1,23): error TS2688: Cannot find type definition file for 'jest'. [ Wasp ] ../../../../node_modules/@testing-library/jest-dom/types/jest.d.ts(9,27): error TS2304: Cannot find name 'expect'....

First Time using opensaas, went through this error

[ ``` Wasp ] prisma-runtime-library.d.ts(2,26): error TS2307: Cannot find module '@prisma/client/runtime' or its corresponding type declarations. [ Wasp ] server/_types/index.ts(6,8): error TS2307: Cannot find module 'express-serve-static-core' or its corresponding type declarations. [ Wasp ] tsconfig.json(2,14): error TS6053: File '@tsconfig/node18/tsconfig.json' not found. [ Wasp ] ../../../../node_modules/@testing-library/jest-dom/types/jest.d.ts(1,23): error TS2688: Cannot find type definition file for 'jest'....

Error handling in actions

How do you safely throw an exception from an action without crashing the server but make sure to notify the client?

primitive type returns in action

Is there a way to return a string in an action? I've tried just adding it to the return statement, but typescript complains. I've also tried adding a returns: { file: File, key: string } statment to my action (I'm already returning a File entity as well). Is this even possible, or do I need to create a separate entity just to return the string?

Migration Error after Fly.io deployment

I recently upgraded wasp from 0.13 to 0.14 and on recent deploys i have encountered an error that doesnt let my server go online. Here is an extract of the error my server logs is throwing:

How to create a credit plan where I want to provide credits to multiple user features

I have app which has multiple features . So if he purchase one time credit, the credit amounts for feature 1 should increase by 10, feature 2 by 20 and feature 3 by 30. This because some feature are costly as they use dependent services and other feature we want to limit so that they don't abuse the system.

CORS error for login when google OAuth is enabled

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. I get this error when i uncomment the google auth bit in main.wasp auth for opensaas it works in dev locally just not production...

Customer portal

ZodError: [ { "code": "invalid_type", "expected": "string", "received": "undefined",...

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