NEROX
NEROX
WWasp-lang
Created by NEROX on 10/16/2024 in #🙋questions
Doing SEO with Wasp
Hi Kapa, I just deployed my app and I am an SEO expert and I want to be able to control everything. Meta title, meta description, json ld, index/noindex, follow/nofollow, robots.txt, sitemap.xml, breadcumbs. Give me all the information you can gather regarding everything I have told you. Give me github threads, issues, etc... I need to know as much as possible all my SEO possibilities (both now and in the future). Remember that I am an SEO expert and it does me no good to just change a title or subtitle. If you do it right you will get the boss to give you a 200€ bonus.
26 replies
WWasp-lang
Created by NEROX on 10/14/2024 in #🙋questions
Failing to deploy (Assign own domain)
I am working with the opensaas template and I have skipped the email configuration since my app will not have registration/login or anything related (so I have Dummy sender). I have tried to deploy with Fly but it returns this error: ❌ --- [Error] Your wasp project failed to compile: ------------------------------- - app.emailSender must not be set to Dummy when building for production. ❌ --- [Error] Building of wasp project failed: ----------------------------------- 1 errors found. 🚀 There was an error running “wasp deploy fly setup <basename> <region>”. Please review the error and try again (if appropriate). ❌ --- [Error] Deploy command failed: --------------------------------------------- Deploy command failed with exit code: 1 I don't want to configure the email, I want to disable or remove it. Ps: what is the reason for the second error?
95 replies
WWasp-lang
Created by NEROX on 10/11/2024 in #🙋questions
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: ❌ --- [Error] Recompilation on file change failed.: ------------------------------ 1 errors found. ❌ --- [Error] Your wasp project failed to compile: ------------------------------- - SDK build failed with exit code: 2 But it immediately starts to recompile: ❌ --- [Error] Recompilation on file change failed.: ------------------------------ 1 errors found ❌ --- [Error] Your wasp project failed to compile: ------------------------------- - SDK build failed with exit code: 2 🐝 --- Recompiling on file change... ---------------------------------------------- Then I stopped the process and used wasp start again. And it started to install all dependencies (still going on): ❌ --- [Error] Recompilation on file change failed.: ------------------------------ 1 errors found ❌ --- [Error] Your wasp project failed to compile: ------------------------------- - SDK build failed with exit code: 2 🐝 --- Recompiling on file change... ---------------------------------------------- ^C rootall@Nerox-LpTp:~/apps/minisaas-boilerplate/app$ wasp start 🐝 --- Starting compilation and setup phase. Hold tight... ------------------------ 🐝 --- Compiling wasp project... -------------------------------------------------- [ Wasp ] Starting npm install [ Wasp ] [ Wasp ] added 1 package, and audited 844 packages in 3s [ Wasp ] [ Wasp ] 140 packages are looking for funding [ Wasp ] run npm fund for details [ Wasp ] [ Wasp ] 9 vulnerabilities (2 low, 3 moderate, 4 high) [ Wasp ] [ Wasp ] To address issues that do not require attention, run: [ Wasp ] npm audit fix [ Wasp ] [ Wasp ] To address all issues (including breaking changes), run: [ Wasp ] npm audit fix --force [ Wasp ] [ Wasp ] Run npm audit for details. [ Client ] Starting npm install [ Server ] Starting npm install [ Server ] Still installing npm dependencies! [ Client ] Still installing npm dependencies! [ Server ] Installation going great - we'll get there soon! [ Client ] Installation going great - we'll get there soon! [ Server ] The installation is taking a while, but we'll get there! [ Client ] The installation is taking a while, but we'll get there! [ Client ] Yup, still not done installing. [ Server ] Yup, still not done installing. [ Server ] We're getting closer and closer, everything will be installed soon! [ Client ] We're getting closer and closer, everything will be installed soon! This only ever happens to me exactly in this scenario (I try to avoid stopping the process at that point), but why does it happen? If everything is installed, why does it take the same time as if I install everything again?
8 replies
WWasp-lang
Created by NEROX on 10/7/2024 in #🙋questions
Use another Database on Development
I have Docker running and I have several branches of my app. There are some variants in which I have to do wasp db migrate-dev and as there are fields that do not exist and others disappear, that database is completely deleted and when using the previous branch I no longer have data. How can I solve this? Is it possible to have several databases running in docker at the same time?
27 replies
WWasp-lang
Created by NEROX on 10/4/2024 in #🙋questions
Hide Loged User Navigation Bar in Onboarding Page
Heyy @kapa.ai I created an onboarding page, that is when the user comes from the register, I want to hide the navigation bar only for this page, I'm working with the SaaS template
21 replies
WWasp-lang
Created by NEROX on 10/3/2024 in #🙋questions
Action in loop
After modifying this: export const updateCurrentUser: UpdateCurrentUser<Partial<User>, User> = async (args, context) => { if (!context.user) { throw new Error('Usuario no autenticado'); } const { firstName, lastName, gender, age, height, currentWeight, trainingGoal, experienceLevel, trainingFrequency, sessionDuration, healthConditions, equipmentAccess, dietaryPreferences, availableTime, exercisePreference } = args; const updatedUser = await context.entities.User.update({ where: { id: context.user.id }, data: { firstName, lastName, gender, age: age !== undefined ? parseInt(age.toString()) : undefined, height: height !== undefined ? parseFloat(height.toString()) : undefined, currentWeight: currentWeight !== undefined ? parseFloat(currentWeight.toString()) : undefined, trainingGoal, experienceLevel, trainingFrequency, sessionDuration, healthConditions, equipmentAccess, dietaryPreferences, availableTime, exercisePreference } }); return updatedUser; }; Based on model User { id String @id @default(uuid()) createdAt DateTime @default(now()) email String? @unique username String? @unique lastActiveTimestamp DateTime @default(now()) isAdmin Boolean @default(false) stripeId String? @unique checkoutSessionId String? subscriptionStatus String? // 'active', 'canceled', 'past_due', 'deleted' subscriptionPlan String? // 'hobby', 'pro' sendNewsletter Boolean @default(false) datePaid DateTime? credits Int @default(3) firstName String? lastName String? gender Gender @default(OTHER) age Int? height Float? currentWeight Float? trainingGoal TrainingGoal? experienceLevel ExperienceLevel? trainingFrequency TrainingFrequency? sessionDuration SessionDuration? healthConditions String? equipmentAccess EquipmentAccess? dietaryPreferences DietaryPreference? availableTime AvailableTime? exercisePreference ExercisePreference[] gptResponses GptResponse[] contactFormMessages ContactFormMessage[] tasks Task[] files File[] weightLogs WeightLog[] // Relación uno a muchos con registros de peso workouts Workout[] // Relación de uno a muchos con rutinas monthlyPlans MonthlyPlan[] // Relación de uno a muchos con los planes mensuales } I get: [ Server ] POST /operations/update-current-user 200 11.305 ms - 809 [ Server ] GET /auth/me 304 6.430 ms - - [ Server ] POST /operations/update-current-user 200 10.870 ms - 809 [ Server ] GET /auth/me 304 6.616 ms - - [ Server ] POST /operations/update-current-user 200 11.727 ms - 809 [ Server ] GET /auth/me 304 6.926 ms - - [ Server ] POST /operations/update-current-user 200 13.249 ms - 809 [ Server ] GET /auth/me 304 9.781 ms - - [ Server ] POST /operations/update-current-user 200 14.145 ms - 809 [ Server ] GET /auth/me 304 5.962 ms - It is running all the time in a loop. https://gyazo.com/b4e078f0823fd7901889df19929de06b
26 replies
WWasp-lang
Created by NEROX on 10/3/2024 in #🙋questions
- SDK build failed with exit code: 2
Heyy @kapa.ai [ Wasp ] ext-src/dashboard/monthlyPlans/MonthlyPlanOperations.ts(19,32): error TS2339: Property 'map' does not exist on type 'never'. [ Wasp ] ext-src/dashboard/monthlyPlans/MonthlyPlanPage.tsx(44,15): error TS2322: Type '(plan: MonthlyPlan & { trainingDays: TrainingDay[]; }) => void' is not assignable to type '(plan: GetResult<{ id: number; name: string; startDate: Date; userId: string; }, unknown> & {}) => void'. [ Wasp ] Types of parameters 'plan' and 'plan' are incompatible. [ Wasp ] Type 'GetResult<{ id: number; name: string; startDate: Date; userId: string; }, unknown> & {}' is not assignable to type 'GetResult<{ id: number; name: string; startDate: Date; userId: string; }, unknown> & {} & { trainingDays: (GetResult<{ id: number; date: Date; workoutId: number; monthlyPlanId: number; }, unknown> & {})[]; }'. [ Wasp ] Property 'trainingDays' is missing in type 'GetResult<{ id: number; name: string; startDate: Date; userId: string; }, unknown> & {}' but required in type '{ trainingDays: (GetResult<{ id: number; date: Date; workoutId: number; monthlyPlanId: number; }, unknown> & {})[]; }'. Whitout seeing code, what fixes what you propose?
12 replies
WWasp-lang
Created by NEROX on 10/2/2024 in #🙋questions
SDK build failed with exit code: 2
Heyy @kapa.ai ! [ Wasp ] ext-src/dashboard/routines/EditRoutineModal.tsx(88,68): error TS2352: Conversion of type 'string' to type 'Set<string>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. [ Wasp ] ext-src/dashboard/routines/RoutineForm.tsx(61,87): error TS2352: Conversion of type 'string' to type 'Set<string>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. [ Wasp ] ext-src/dashboard/routines/RoutinesPage.tsx(36,15): error TS2322: Type '(GetResult<{ id: number; name: string; userId: string; }, unknown> & {})[]' is not assignable to type 'RoutineWithExercises[]'. [ Wasp ] Property 'exercises' is missing in type 'GetResult<{ id: number; name: string; userId: string; }, unknown> & {}' but required in type 'RoutineWithExercises'. My main.wasp: // Routine Queries query getRoutines { fn: import { getRoutines } from "@src/dashboard/routines/RoutineQueries", entities: [Routine, Exercise] } // Routine Actions action createRoutine { fn: import { createRoutine } from "@src/dashboard/routines/RoutineActions", entities: [Routine, Exercise] } action updateRoutine { fn: import { updateRoutine } from "@src/dashboard/routines/RoutineActions", entities: [Routine, Exercise] } action deleteRoutine { fn: import { deleteRoutine } from "@src/dashboard/routines/RoutineActions", entities: [Routine] } // Routine Route route RoutinesRoute { path: "/routines", to: RoutinesPage } page RoutinesPage { component: import RoutinesPage from "@src/dashboard/routines/RoutinesPage", authRequired: true } Schema.prisma model User { id String @id @default(uuid()) routines Routine[] // Relación de uno a muchos con rutinas } model Routine { id Int @id @default(autoincrement()) name String exercises Exercise[] // Relación muchos-a-muchos con ejercicios user User @relation(fields: [userId], references: [id]) userId String } model Exercise { id Int @id @default(autoincrement()) name String instructions String difficulty Difficulty equipmentRequired Boolean equipment String? bodyPart BodyPart @relation(fields: [bodyPartId], references: [id]) bodyPartId Int routines Routine[] } model BodyPart { id Int @id @default(autoincrement()) name String @unique // Nombre de la parte del cuerpo description String? // Añade esta línea exercises Exercise[] // Relación uno-a-muchos con ejercicios } Where and why do you think this error occurs, how can we solve it? Which code of my project would help you to solve the problem?
76 replies
WWasp-lang
Created by NEROX on 10/1/2024 in #🙋questions
- SDK build failed with exit code: 2
Heyy @kapa.ai I need your wisdom here [ Wasp ] ext-src/dashboard/exercises/ExerciseForm.tsx(22,58): error TS2345: Argument of type 'GetBodyParts' is not assignable to parameter of type 'Query<never, Payload>'. [ Wasp ] Type 'GetBodyParts' is not assignable to type '(args?: unknown) => Promise<Payload>'. [ Wasp ] Target signature provides too few arguments. Expected 2 or more, but got 1. [ Wasp ] ext-src/dashboard/exercises/ExerciseForm.tsx(23,32): error TS2304: Cannot find name 'useAction'. //@src/dashboard/bodyparts/BodyPartQueries.ts import { GetBodyParts, GetBodyPartById } from 'wasp/server/operations'; export const getBodyParts: GetBodyParts = async (args, context) => { return context.entities.BodyPart.findMany(); }; export const getBodyPartById: GetBodyPartById = async ({ id }, context) => { const bodyPart = await context.entities.BodyPart.findUnique({ where: { id }, include: { exercises: true } }); if (!bodyPart) { throw new Error('BodyPart not found'); } return bodyPart; }; //@src/dashboard/exercises/ExerciseActions.ts import { CreateExercise, UpdateExercise, DeleteExercise } from 'wasp/server/operations'; export const createExercise: CreateExercise = async ({ name, instructions, difficulty, equipmentRequired, equipment, bodyPartId }, context) => { return context.entities.Exercise.create({ data: { name, instructions, difficulty, equipmentRequired, equipment, bodyPart: { connect: { id: bodyPartId } } } }); }; export const updateExercise: UpdateExercise = async ({ id, name, instructions, difficulty, equipmentRequired, equipment, bodyPartId }, context) => { return context.entities.Exercise.update({ where: { id }, data: { name, instructions, difficulty, equipmentRequired, equipment, bodyPart: { connect: { id: bodyPartId } } } }); }; export const deleteExercise: DeleteExercise = async ({ id }, context) => { const exercise = await context.entities.Exercise.findUnique({ where: { id } }); if (!exercise) { throw new Error('Exercise not found'); } return context.entities.Exercise.delete({ where: { id } }); }; What and where is going something wrong?
74 replies
WWasp-lang
Created by NEROX on 9/26/2024 in #🙋questions
Customer Portal not displaying?
No description
63 replies
WWasp-lang
Created by NEROX on 9/25/2024 in #🙋questions
wasp start can be faster building?
When you make changes in your Wasp app and stop and do wasp start again, how long does it take? Or for example I work from windows with wsl, on a real linux would that compilation time be faster?
13 replies
WWasp-lang
Created by NEROX on 9/15/2024 in #🙋questions
Strugle with Dark/Light mode (AI-Created React components)
No description
16 replies
WWasp-lang
Created by NEROX on 9/13/2024 in #🙋questions
Use Astro for Docs (but other thing for Blog)
I am trying to understand how I can use something “extra” (excuse some non-tech terms), some other library or similar to not use what is Astro for Blog. I will use Astro for Docs because the layout is ideal but I would like to be able to use it as a different “layout” from the blog frontend. Any recommendations? Can you modify in Astro things as if it were a “Theme Builder” like Divi, Astra, etc... For wordpress? For example Railway has Docs similar to Astro: https://docs.railway.app/ And their blog is "different", so I assume they are using other "thing, library, dependency": https://blog.railway.app/
31 replies