Conspyre
Conspyre
WWasp-lang
Created by Conspyre on 9/16/2024 in #🙋questions
Issues with deploying to baremetal
The Wasp application is deployed, but all requests (including static assets) are being caught by the catch-all route, resulting in a "{"message":"Catch-all route"}" response. - Apache is configured as a reverse proxy. - Node.js server (Wasp backend) is running on port 5555. - Static files are present in the correct build directory. We've tried updating the Apache configuration to serve static files and proxy only API requests. I can verify that the Node.js server is responding correctly to API requests. The application works correctly in development mode with wasp start. Static assets are not being served properly in production; loading for instance http://<mysite>/index.html or http://<mysite>/login is being routed to the catch-all route, seemingly intercepting all requests.
35 replies
WWasp-lang
Created by Conspyre on 9/8/2024 in #🙋questions
P1 bug in wasp causing insanity in developer. Please isolate and fix. :-)
I just spent a day tracking down a problem, which manifests itself in a very unusual way,. Adding this line of code (to a server-side .js file): import { subtractCredits } from 'wasp/server/operations' This causes relative imports to stop working, and you can't fix the build by fixing them (obvious now, not so a few hours ago). The broken import is the only error emitted during the build, so the tools leave you in a hole. Git archaeology FTW. ------- In main.wasp we have defined subtractCredits as follows: action subtractCredits { fn: import { subtractCredits } from "@src/payment/creditManagement.js", entities: [User] } and in src/payment/creditManagement.ts we have a "export const subtractCredits = async (args, context) => { ... }. Not 100% certain what's wrong here. This code is server side as stated above. We call it successfully from client. This is the first time I tried to call it from server, and not only does it not work, it silently murders the build. 😦 [EDIT: Just saw the mismatch between .js and .ts in the import/actual filetype, unfortunately that was not the cause of the problem as the imports still break after fixing...]
40 replies
WWasp-lang
Created by Conspyre on 9/7/2024 in #🙋questions
"Hidden" schema error (?) causing cascading import failures
I had a feature branch working, with large numbers of code and schema changes. I switched branches, causing consternation in prisma & generated a migration and blew away the database in order to run. I did some other work in master, now I've switched back to the feature branch and made (another) migration for the same thing... Now I am getting a seemingly endless series of errors on code which isn't changed by this branch, all of the form "import foo from '../somewhere/somthing". It seems if I modify the import path in some way, like, say if it was "../server/foo" but we are already in the server directory, I can change it to "./foo" - which is technically the same directory, then we get past that error. Then another seemingly random import from another file (which used to work), is now failing, it seems the compilation stops on the first broken import & many are broken. I can sweep through many files which should not need to be changed, and seemingly never clear this. Wasp clean / wasp build does not change the outcome. I believe this is related to a schema change, because had this same scenario ≈ two weeks ago and had to hand-merge-file-by-file until I -finally- got an error message related to schema which I fixed - and this problem went away. I forget what that issue was, but this is the same symptom. What could be the issue @kapa.ai ?
8 replies
WWasp-lang
Created by Conspyre on 9/6/2024 in #🙋questions
How to implement file upload middleware for large video files in a Wasp app?
...trying to implement a video upload feature in our Wasp app that can handle large files (>50MB) using chunked uploads. We need to configure middleware for file uploads, but we're encountering issues with setting up express-fileupload middleware in Wasp. What's the correct way to implement custom middleware for file uploads in a Wasp app, particularly for handling large files with multipart uploads to an S3-compatible storage (Wasabi)?
23 replies
WWasp-lang
Created by Conspyre on 9/4/2024 in #🙋questions
server side imports of the form "./foo" used to work and now fail
Example: import { taskCache } from './config'; This was working for many versions. I've created a new branch, added a bunch of new code which appears to have caused a new issue with this import style. Now there are dozens of compile errors in the old code. ALL imports of this nature are failing. To make them compile again, I seem to have to do a pattern like: import { taskCache } from "../server/config.js" What could cause this behavior - and why do I need to make this change across a lot of imports which used to just work? I have not updated wasp.
9 replies
WWasp-lang
Created by Conspyre on 9/3/2024 in #🙋questions
General Q: on every branch switch, wasp/prisma wants to make a new migration, is this the right way?
If I have a feature branch B and I switch back to branch A, it seems that prisma wants to create a migration to get the database back to the state which is A. When I switch back to feature branch B, it seems that prisma wants to create a migration to get back to that state. [repeats] Is this the usual development paradigm? Creating new migrations each time we bounce to a different branch, or have I missed the proper workflow here?
6 replies
WWasp-lang
Created by Conspyre on 9/2/2024 in #🙋questions
Dependency hell
Trying to install a package, and it wants to update react-router-dom. I've been in somewhere around the 5th ring of hell for the last hour, the path to Nirvana is entirely unclear as Wasp takes a massive 💩 when the version of react-router-dom != 5.3.3. What to do, @kapa.ai?
15 replies
WWasp-lang
Created by Conspyre on 8/31/2024 in #🙋questions
One click deploy on baremetal?
Railway deploy is super simple, but VPS lack sufficient computrons for video tasks. Couple weeks ago, I tried deploying to baremetal/Ubuntu and was brickwalled on some $^%^% thing (details of which have long since popped off my stack). Is there any guidance to create a "one click" deploy script?
7 replies
WWasp-lang
Created by Conspyre on 8/23/2024 in #🙋questions
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! 😎
8 replies
WWasp-lang
Created by Conspyre on 8/22/2024 in #🙋questions
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..
20 replies
WWasp-lang
Created by Conspyre on 8/21/2024 in #🙋questions
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?
17 replies
WWasp-lang
Created by Conspyre on 8/21/2024 in #🙋questions
Moving from dev (local) to staging server, access control issues abound
I am getting numerous errors loading the /signup page of the form: [blocked] The page at https://mydomain.com/signup was not allowed to display insecure content from http://localhost:3001/auth/me Then when I go to sign up, further errors of the form: Not allowed to request resource XMLHttpRequest cannot load http://loclhost:3001/auth/me due to access control checks I cannot find any references in the app code to localhost or /auth/me so I assume this is coming from the wasp framework. I've configured an extremely permissive cors middleware: ----- import cors from 'cors'; export const corsMiddleware = cors({ origin: true, // Allow any origin credentials: true, }); ----- I note that there is only one endpoint in the main.wasp that specifies a middlewareConfigFn, and that is our Stripe webhook. What could be the issue @kapa.ai
16 replies
WWasp-lang
Created by Conspyre on 8/15/2024 in #🙋questions
Getting a 404 on our test API route
Trying adding an api route like so: api inference { fn: import { inferenceHandler } from "@src/server/api/inference.js", middlewareConfigFn: import { inferenceMiddlewareFn } from "@src/server/api/inferenceMiddleware", httpRoute: (POST, "/api/inference"), auth: true } No errors are given in the output of "wasp start" however the route is 404 when we try to access it.
28 replies
WWasp-lang
Created by Conspyre on 8/3/2024 in #🙋questions
Routing issues with signup/login
I'm using the provided boilerplate for signup/login, which use the <SignupForm> and <LoginForm> which appear to be provided by wasp. When user clicks the Login or Signup buttons, there is an error either /api/auth/username/login or /api/auth/username/signup are 404. It is not clear what is happening, do we need to supply code for these routes?
9 replies