AAA
AAA
WWasp
Created by AAA on 1/20/2025 in #🙋questions
Stripe Problem! Everything works on dev, but not on prod
Classic, everything works on my end but not on prod. I highly suggest everyone to make a 100% coupon before your customers complain! When running on dev with the stripe webhook everything is fine and dandy. When running on prod with stripe and fly, I get 200s and delivered. They thing I don't understand is that I've updated the webhook.ts to give these logs so I can debug and understand them console.log('Processing customer.subscription.updated:', { subscriptionId: updatedSubscription.id, customerId: updatedSubscription.customer, status: updatedSubscription.status, cancelAtPeriodEnd: updatedSubscription.cancel_at_period_end }); on dev I see the logs with the stripe webhook running on prod (on flys server) I don't see them! Is that the clue? Anyone had such an issue?
33 replies
WWasp
Created by AAA on 1/13/2025 in #🙋questions
AfterEmailVerificationHook
Is there an afterEmailVerificationHook so I can send a welcome email?
8 replies
WWasp
Created by AAA on 1/11/2025 in #🙋questions
Database Migration Problem
Hello! I finally found the error that confused me a lot at the beginning of wasp. Assume we have a model
model UserMetrics {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt

user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
userId String @id
credits Int @default(15)
flashcardsCreated Int @default(0)
}
model UserMetrics {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt

user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
userId String @id
credits Int @default(15)
flashcardsCreated Int @default(0)
}
Now we change this in dev to
model UserMetrics {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt

user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
userId String @id
credits Int @default(15)
SOMEOTHERNAMEFLASHCARD Int @default(0)
}
model UserMetrics {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt

user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
userId String @id
credits Int @default(15)
SOMEOTHERNAMEFLASHCARD Int @default(0)
}
In dev we will get a message to confirm this change and it will migrate. I noticed when I run my github action to prod (similar to this) https://github.com/wasp-lang/deploy-action There will be no migration in our database in prod, this will create major problems that I can't fix! Somewhere it says there are no migrations needed and the result is that our schema.prisma has the change, but the migration.sql wasn't run. This migration was one that needed a manual user input in dev (just to confirm), what happens with manual user input in prod?
13 replies
WWasp
Created by AAA on 11/14/2024 in #🙋questions
Newsletter/TemplateId
I moved my thread from Feature-suggestions to questions https://github.com/wasp-lang/wasp/issues/1553 Hey has this been solved or will this just be closed as not possible? I was trying to use templateId, I guess I could just make a html but would be cooler if I could use templateId from SendGrid. I solved this by using export const registerTemplate = "my html file" and made my html template through sendgrid. import { registerTemplate } from './templates/register-template'; export const getVerificationEmailContent: GetVerificationEmailContentFn = ({ verificationLink }) => { const html = registerTemplate.replace('{{verificationLink}}', verificationLink); return { subject: 'Welcome to myappname!', html, text: Please verify your email by clicking this link: ${verificationLink} }; Also about creating a newsletter, I still think this would be cleaner if I did this via sendgrid or hubspot or? Is there any guidelines/best practices about how you all do newsletters?
6 replies
WWasp
Created by AAA on 10/31/2024 in #🙋questions
Web workers
Is there anything I need to take into account with wasp about creating a web worker?
6 replies
WWasp
Created by AAA on 10/24/2024 in #🙋questions
Another Deployment issue
Hey! I get another odd error here, I run wasp clean and wasp start and for everything is great and when I deploy I get this error. I tore down my previous project and used a new name and so on fly.io. Any leads would be great, I'm not getting too far with cursor let output = new ProcessOutput(code, signal, stdout, stderr, combined, message); ^ ProcessOutput [Error]: at deployClient (file:///home/anon/.local/share/wasp-lang/0.15.0/data/packages/deploy/dist/providers/fly/deploy/deploy.js:82:13) exit code: 2 (Misuse of shell builtins) at ChildProcess.<anonymous> (file:///home/anon/.local/share/wasp-lang/0.15.0/data/packages/deploy/node_modules/zx/build/core.js:146:26) at ChildProcess.emit (node:events:519:28) at maybeClose (node:internal/child_process:1105:16) at ChildProcess._handle.onexit (node:internal/child_process:305:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { _code: 2, _signal: null, _stdout: '\n' + '> [email protected] build\n' + '> npm run validate-env && tsc && vite build\n' + '\n' + '\n' + '> [email protected] validate-env\n' + '> node -r dotenv/config ./scripts/validate-env.mjs\n' + '\n' + '🔍 Validating environment variables...\n' + "../../../src/admin/dashboards/analytics/AnalyticsDashboardPage.tsx(18,6): error TS2786: 'DefaultLayout' cannot be used as a JSX component.\n" + " Its type 'FC<Props>' is not a valid JSX element type.\n" + " Type 'FunctionComponent<Props>' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => ReactNode'.\n" + Type 'import("/home/anon/wasp-project/vera/app/node_modules/@types/react/index").ReactNode' is not assignable to type 'React.ReactNode'.\n + " Type 'bigint' is not assignable to type 'ReactNode'.\n" +
13 replies
WWasp
Created by AAA on 10/21/2024 in #🙋questions
How is the wasp website built?
https://wasp-lang.dev/ 1) I wanted to contribute a few docs and would rather see the website before I submit 2) Mostly I wanted to move deployment not to be nested under /advanced, or? Deployment is actually a general topic for everyone.
9 replies
WWasp
Created by AAA on 10/17/2024 in #🙋questions
Regarding ask-the-documents WSL2 solution to compile
Error: P3006 Migration 20230907154352_add_extension failed to apply cleanly to the shadow database. Error: ERROR: extension "vector" is not available DETAIL: Could not open extension control file "/usr/share/postgresql/16/extension/vector.control": No such file or directory. HINT: The extension must first be installed on the system where PostgreSQL is running. 0: sql_schema_connector::validate_migrations with namespaces=None at schema-engine/connectors/sql-schema-connector/src/lib.rs:335 1: schema_core::state::DevDiagnostic at schema-engine/core/src/state.rs:276 Commands for people on wsl2 to compile the project First, access the PostgreSQL container: docker exec -it $(docker ps | grep postgres | awk '{print $1}') bash apt-get update apt-get install -y build-essential postgresql-server-dev-16 git git clone https://github.com/pgvector/pgvector.git cd pgvector make USE_PGXS=1 make install USE_PGXS=1 psql -U postgresWaspDevUser -d askTheDocuments-e44202d61c -c "CREATE EXTENSION IF NOT EXISTS vector;" exit wasp db migrate-dev
7 replies
WWasp
Created by AAA on 9/30/2024 in #🙋questions
The vulnerabilities are for everyone right?
I've compiled the general template and I see this as well, just want to confirm 5 vulnerabilities (2 moderate, 3 high) This is for everyone because of wasp's dependency on outdated express version correct? Also, Wasp is absolutely wonderful and the future of making apps, the way you all have seamlessly integrated emails, jobs, authentication, CRUD, - I am so impressed.
10 replies
WWasp
Created by AAA on 9/22/2024 in #🙋questions
Control order of fields through SignupForm/ additionalFields before email and password
Need to ask for firstName and lastName during the sign up. To make it pretty I want it to be FirstName LastName Username Password Byt additionalFields <SignupForm additionalFields={[ { name: 'firstName', label: 'First Name', type: 'input', validations: { required: 'First name is required', }, }, { name: 'lastName', label: 'Last Name', type: 'input', validations: { required: 'Last name is required', }, }, ]} /> I see that in Signup.tsx & { additionalFields?: AdditionalSignupFields; }) will always come last. If I modify Signup.tsx it will be overrwritten when I do wasp clean or?
7 replies