Wasp-lang

W

Wasp-lang

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

Join

Updating to Prisma v5

Half question, half suggestion. Prisma v5 has performance improvements, but more important transactions & createManyAndReturn are available. I feel transactions are very important because they allow easy way to rollback. If I am updating multiple tables for a single operation and if anything fails in this process, now I have to find all previous updates and make sure they are rolled back. I am not aware if there is an API way of doing this without transactions in prisma. Let me know your thoughts. Thanks. PS: I did try to update to v5, however, v4.16 comes from another dependency or from the internal engine I think, so I couldn't change it by just updating package.json....

Error Report from Stripe.ts and Relevant Questions

Posting enough to show error for privacy reasons: ```Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client. at stripeWebhook (/path/app/src/server/webhooks/stripe.ts:253:26)...

stripe best practices

I built out an MVP using wasp AI. Is there an easy way to port it over to Opensaas so i can have stripe? or should i just add stripe to my current app? I'm curious to hear what most peoples' workflows are...

Deploying wasp(0.14.1 ) ubuntu(22.04) vultr server

we are creating an ai photo web app where a backend ai will scan a photo identify certain features then return the photo to the user with specific changes. Does wasp have all the front end features necessary to accomplish this and work smoothly with our back end ai? and how do you recommend i proceed?...

Enable SSH on Backend-Server

I recently migrated to Azure and would like to enable SSH to connect to the docker container for troubleshooting in case something goes wrong. I found this Guide on how to set this up: https://learn.microsoft.com/en-gb/azure/app-service/configure-custom-container?tabs=debian&pivots=container-linux#enable-ssh It needs me to add an sshd_config file on root level (i guess i would do this by cpy during build) and also modify the Dockerfile which is created during Build. I guess there is no way for me to modify this file without writing a script which manually inserts parts on specific lines. Any advice on this?...

Deploying Wasp/fastapi on Digital Ocean

My project is mostly wasp (react/node), but it involves some api calls to fastapi where I have some NLP functionality built in python. I'm almost done locally, but I want to deploy on Digital Ocean because of it's flexible pricing tiers.
I've already dockerized fastapi, and I'm wondering what else I'd need to do to make deployment easier. Do I need to now dockerize both wasp and fastapi together? Is wasp already dockerized?...

my cursor ide broke something, i have no idea how to fix it.

i'm getting this error
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@wasp/core' imported from /Users/d/Projects/videoupdate/videoupdate/app/.wasp/out/server/bundle/server.js
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@wasp/core' imported from /Users/d/Projects/videoupdate/videoupdate/app/.wasp/out/server/bundle/server.js
tried wasp clean/build/start steps but it's not helping.....

Outside of Vite service allow list

Hi Guys! I keep getting this randomly but for like every page.... [ Client!] The request url "/users/jacobferrari/documents/waspapp/my-saas/app/src/client/app/productpage.tsx" is outside of Vite serving allow list....

OpenSaaS add entities into useAuth/getMe or User entity

I have two models. 1 User model and 1 Restaurant model. There is an relation and I want to access Restaurant model in the user model to get the information from there, example in useAuth()

Is there a way to modify the GPT choices to use 4o instead of gpt-4 in "wasp new AI-generated "

Choose GPT model(s) you want to use: [1] gpt-4 (planning) + gpt-3.5-turbo (coding) (default) Ok results. Cheap and fast. Best cost/benefit ratio. [2] gpt-4 (planning) + gpt-4-turbo-preview (coding) Possibly better results, but somewhat slower and somewhat more expensive (~2-3x)....

How to integrate ShadCN components in Opensaas correctly?

I have a few ShadCN components that worked after restructuring the project because '@/components' and '@/libs' paths are not found. However the ShadCN dialog component still isn't working. Can you help me set up the components correctly when calling npm shadcn@latest init and npm shadcn@latest add button dialog etc... ...

Difficulty deploying via dockerfile to coolify

Trying to deploy my wasp app (which works via netlify/fly.io) to a self-hosted coolify. If I use the dockerfile generated by wasp build with no changes I get module not found errors. The dockerfile will execute, container will start and it processes through, connects to the DB using prisma schema but then: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/app/node_modules/wasp/dist/universal/validators.js' imported from /app/.wasp/build/server/scripts/validate-env.mjs at new NodeError (node:internal/errors:405:5) at finalizeResolution (node:internal/modules/esm/resolve:327:11) at moduleResolve (node:internal/modules/esm/resolve:946:10) at defaultResolve (node:internal/modules/esm/resolve:1132:11)...

Serve /public files in prod (build)

Hello, I have a weird scenario in which I download a file on my API, save it in /public so the frontend can access it, and then I spin remotion to render the video in the background. Issue is I keep getting errors saying Error: ENOENT: no such file or directory, open '/app/public/0b985bfc-3d43-49d6-8d4c-7cc4bff1e24e.mp4' Some of the code used for this:...

User Tier doesn't update

Hello fellas, I am trying to test stripe in production and even though the transaction is shown as successful and i am redirected, the user's properties does not update that is it stays the same. It however works perfectly fine on my own machine. I cannot seem to see where this is going wrong does anyone have an idea? Is it not possible to do this?...

Dark theme by default?

Hey, I was wondering how to make 'dark' as default theme ``` export default function useColorMode() { const [colorMode, setColorMode] = useLocalStorage('color-theme', 'light'); ...

Embeddings template needs pinecone update

Similar to https://github.com/wasp-lang/wasp/issues/1725, but now pinecone has released v3 which removes the need for an environment when setting up the API. This makes the tutorial a bit confusing as the example .env file includes PINECON_ENV of which there is now no reference on the Pinecone site. Recommend upgrading to Pinecone ^3.0.2, removing reference to PINECONE_ENV and adding a spec property in the generateEmbeddings.ts file as per pinecone docs ```ts await pinecone.createIndex({ // add this...

Added a new page, can't get it to load

Hi I am new here so please bear with the newbie question! I am using the default saas template [option 3 when running wasp new]. In the main.wasp file I have created a new route and page, and also created the tsx file for the page and referenced it's location correctly. However the page is blank when I navigate to it in my browser. Note sure what I am doing wrongly main.wasp code...

Binary for ARM64?

I am very interested in using wasp but the servers have Ubuntu ARM64 architecture and noticed you only provide a binary for x86. Any way I’d be able to this on my servers? Or potentially set up a workflow so that I can run the binary locally but work on the codebase remotely?...

Deploying Migration fails

During the server build process, I keep getting this error message:
[email protected] db-migrate-prod prisma migrate deploy --schema=../db/schema.prisma
Prisma schema loaded from ../db/schema.prisma...