NEROX
NEROX
WWasp-lang
Created by NEROX on 11/14/2024 in #🙋questions
Navigating with /names/ instead /ids/
How can I change my navigation so instead the final slug is /subject/maths/grades instead of /subject/31c984d4-686d-4c3e-97dc-94dbd2bc5a58/grades Information to note, names can be repeated in the db so the key identifier is still the id but I want only the name.
14 replies
WWasp-lang
Created by NEROX on 11/13/2024 in #🙋questions
migrate found failed migrations in the target
2024-11-13T09:21:07.224 app[d89015ef6d74e8] mia [info] migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
48 replies
WWasp-lang
Created by NEROX on 11/7/2024 in #🙋questions
Prisma Studio Deployed App (Fly)
How?
54 replies
WWasp-lang
Created by NEROX on 11/6/2024 in #🙋questions
Error calculating daily stats Production
Error calculating daily stats: Error: 2 UNKNOWN: Getting metadata from plugin failed with error: error:1E08010C:DECODER routines::unsupported
71 replies
WWasp-lang
Created by NEROX on 11/4/2024 in #🙋questions
Failed to resolve import
[plugin:vite:import-analysis] Failed to resolve import "../../../../src/admin/dashboards/analytics/AnalyticsDashboardPage" from "src/router.tsx". Does the file exist? /home/rootall/apps/minisaas-boilerplate/app/.wasp/out/web-app/src/router.tsx:9:35 5 | import { LoginPage } from "../../../../src/auth/LoginPage"; 6 | import { TooGradedPage } from "../../../../src/toograded/TooGradedPage"; 7 | import AnalyticsDashboardPage from "../../../../src/admin/dashboards/analytics/AnalyticsDashboardPage"; | ^ 8 | import { SGPACalculatorPage } from "../../../../src/sgpa-calculator/SGPACalculatorPage"; 9 | import { CGPACalculatorPage } from "../../../../src/cgpa-calculator/CGPACalculatorPage"; what's wrong???
49 replies
WWasp-lang
Created by NEROX on 11/3/2024 in #🙋questions
router.tsx:7 Uncaught SyntaxError: The requested module '/@fs/home/rootall/apps/minisaas-boilerplate
router.tsx:7 Uncaught SyntaxError: The requested module '/@fs/home/rootall/apps/minisaas-boilerplate/app/src/auth/LoginPage.tsx' does not provide an export named 'default' (at router.tsx:7:8) why? loginpage.tsx: import { Link } from 'react-router-dom'; import { LoginForm } from 'wasp/client/auth'; export const LoginPage = () => { return ( <div style={{ maxWidth: '400px', margin: '0 auto' }}> <LoginForm /> <br /> <span> I don't have an account yet (<Link to="/signup">go to signup</Link>). </span> </div> ); }; main.wasp: route LoginRoute { path: "/login", to: LoginPage } page LoginPage { component: import Login from "@src/auth/LoginPage" }
5 replies
WWasp-lang
Created by NEROX on 11/2/2024 in #🙋questions
Fail to compile
@kapa.ai Help! [ Wasp ] ext-src/cgpa-calculator-2/calculator/CGPACalculator2.tsx(3,10): error TS2724: '"wasp/client/operations"' has no exported member named 'createCGPACalculation2'. Did you mean 'createCGPACalculation'? [ Wasp ] ext-src/cgpa-calculator-2/calculator/CGPACalculator2.tsx(138,17): error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'SetStateAction<CalculationResult>'. [ Wasp ] ext-src/cgpa-calculator-2/operations.ts(1,10): error TS2724: '"wasp/server/operations"' has no exported member named 'CreateCGPACalculation2'. Did you mean 'CreateCGPACalculation'? [ Wasp ] ext-src/cgpa-to-percentage-calculator2/calculator/CGPAToPercentageCalculator2.tsx(48,35): error TS2339: Property 'percentage' does not exist on type '{ cgpaResult: number; semesters: any[]; }'. ❌ --- [Error] Your wasp project failed to compile: ------------------------------- - SDK build failed with exit code: 2 ❌ --- [Error] Compilation of wasp project failed: -------------------------------- 1 errors found
72 replies
WWasp-lang
Created by NEROX on 10/31/2024 in #🙋questions
Embeddings SaaS Template
What is [4] embeddings Comes with code for generating vector embeddings and performing vector similarity search. And what king of things it have? Features? Pages? etc... All
21 replies
WWasp-lang
Created by NEROX on 10/30/2024 in #🙋questions
Error deploying after migrating to ^0.15.0
The wasp start works fine and show all fine. Doing wasp deploy fly deploy it fails giving me these errors: Visit your newly deployed app at https://toograded-server.fly.dev/ 🚀 Server has been deployed! 🚀 Deploying your client now... $ cd /home/rootall/apps/minisaas-boilerplate/app/.wasp/build/web-app 🚀 Building web client for production... 🚀 If you configured a custom domain for the server, you should run the command with an env variable: REACT_APP_API_URL=https://serverUrl.com wasp deploy fly deploy $ npm install added 1 package, and audited 84 packages in 975ms 11 packages are looking for funding run npm fund for details found 0 vulnerabilities $ REACT_APP_API_URL=https://toograded-server.fly.dev npm run build > [email protected] build > npm run validate-env && tsc && vite build > [email protected] validate-env > node -r dotenv/config ./scripts/validate-env.mjs 🔍 Validating environment variables... src/router.tsx(68,13): error TS2741: Property 'children' is missing in type '{}' but required in type '{ children: ReactNode; }'. file:///home/rootall/.local/share/wasp-lang/0.15.0/data/packages/deploy/node_modules/zx/build/core.js:146 let output = new ProcessOutput(code, signal, stdout, stderr, combined, message); ^ ProcessOutput [Error]: at deployClient (file:///home/rootall/.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/rootall/.local/share/wasp-lang/0.15.0/data/packages/deploy/node_modules/zx/build/core.js:146:26) at ChildProcess.emit (node:events:517:28) at maybeClose (node:internal/child_process:1098:16) at ChildProcess._handle.onexit (node:internal/child_process:303:5) at Process.callbackTrampoline (node:internal/async_hooks:128: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/router.tsx(68,13): error TS2741: Property 'children' is missing in type '{}' but required in type '{ children: ReactNode; }'.\n", _stderr: '', _combined: '\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/router.tsx(68,13): error TS2741: Property 'children' is missing in type '{}' but required in type '{ children: ReactNode; }'.\n" } Node.js v18.20.4 ❌ --- [Error] Deploy command failed: --------------------------------------------- Deploy command failed with exit code: 1
31 replies
WWasp-lang
Created by NEROX on 10/30/2024 in #🙋questions
[ Server ] GET /auth/me 401 1.305 ms - 43
When I run my app It gives me always this in the client console. [ Server ] GET /auth/me 401 1.305 ms - 43 Why? From where it comes?
12 replies
WWasp-lang
Created by NEROX on 10/29/2024 in #🙋questions
Improve SPA PageSpeed (OpenSaaS) - Bad Score in Core Web Vitals
I have been researching ways to improve the performance and scoring of my WASP project, particularly focusing on optimizing PageSpeed, especially for the mobile version. Currently, I'm working with WASP version 0.14, but I'm considering migrating to version 0.15. In this context, I would like to understand more about the handling of the main.wasp file with TypeScript in version 0.15. Since I’m not a developer, I don’t have an extensive background in this area, and the introduction of TypeScript isn’t immediately clear to me. Could explain what capabilities TypeScript offers in this version and how it might impact my project? Ideas?
50 replies
WWasp-lang
Created by NEROX on 10/28/2024 in #🙋questions
Google Analytics doesn't track navigation between pages (SPA Google Analytics Integration)
I have run out of the Plausible trial, I want to put GAnalytics. Inside: https://docs.opensaas.sh/guides/analytics/ I have done this step: import { getDailyPageViews, getSources } from './providers/googleAnalyticsUtils'; and I have in: .env.server: GOOGLE_ANALYTICS_CLIENT_EMAIL. GOOGLE_ANALYTICS_PROPERTY_ID GOOGLE_ANALYTICS_PRIVATE_KEY .env.client: REACT_APP_GOOGLE_ANALYTICS_ID I actually pushed the secrets to fly I think I've done everything right but when I fly deploy, it tells me: 🐝 --- Building SDK... ------------------------------------------------------------ [ Wasp ] ext-src/analytics/stats.ts(6,81): error TS1002: Unterminated string literal. ❌ --- [Error] Your wasp project failed to compile: ------------------------------- - SDK build failed with exit code: 2 ❌ --- [Error] Building of wasp project failed: ----------------------------------- 1 errors found. file:///home/rootall/.local/share/wasp-lang/0.14.2/data/packages/deploy/node_modules/zx/build/core.js:146 let output = new ProcessOutput(code, signal, stdout, stderr, combined, message); '\x1B[34m[\x1B[0m \x1B[34mDb\x1B[0m \x1B[34m]\x1B[0m You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client\n' + '\x1B[34m[\x1B[0m \x1B[34mDb\x1B[0m \x1B[34m]\x1B[0m ```\n' + "\x1B[34m[\x1B[0m \x1B[34mDb\x1B[0m \x1B[34m]\x1B[0m import { PrismaClient } from '@prisma/client'\n" + '\x1B[34m[\x1B[0m \x1B[34mDb\x1B[0m \x1B[34m]\x1B[0m const prisma = new PrismaClient()\n' + '\x1B[34m[\x1B[0m \x1B[34mDb\x1B[0m \x1B[34m]\x1B[0m ```\x1B[33m\n' + '✅ --- Database successfully set up. ----------------------------------------------\n' + '\x1B[0m\n' + '\x1B[33m\n' + '🐝 --- Building SDK... ------------------------------------------------------------\n' + '\x1B[0m\n' + '\n' + '\x1B[33m[\x1B[0m \x1B[33mWasp\x1B[0m \x1B[33m]\x1B[0m ext-src/analytics/stats.ts(6,81): error TS1002: Unterminated string literal.\x1B[31m\n' + '\n' + '❌ --- [Error] Your wasp project failed to compile: -------------------------------\n' + '\n' + '- SDK build failed with exit code: 2\x1B[0m\n' + '\x1B[31m\n' + '\n' + '❌ --- [Error] Building of wasp project failed: -----------------------------------\n' + '\n' + '1 errors found.\x1B[0m\n', _stderr: '\n' + '\x1B[35m[\x1B[0m \x1B[35mServer\x1B[0m\x1B[1m\x1B[31m!\x1B[0m\x1B[35m]\x1B[0m npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.\n' + '\x1B[35m[\x1B[0m \x1B[35mServer\x1B[0m\x1B[1m\x1B[31m!\x1B[0m\x1B[35m]\x1B[0m npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead\n' + '\x1B[35m[\x1B[0m \x1B[35mServer\x1B[0m\x1B[1m\x1B[31m!\x1B[0m\x1B[35m]\x1B[0m npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported\n' + '\x1B[35m[\x1B[0m \x1B[35mServer\x1B[0m\x1B[1m\x1B[31m!\x1B[0m\x1B[35m]\x1B[0m npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported\n' + '\x1B[35m[\x1B[0m \x1B[35mServer\x1B[0m\x1B[1m\x1B[31m!\x1B[0m\x1B[35m]\x1B[0m npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead\n' + '\x1B[35m[\x1B[0m \x1B[35mServer\x1B[0m\x1B[1m\x1B[31m!\x1B[0m\x1B[35m]\x1B[0m npm warn deprecated [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options.', _combined: '\x1B[33m\n' + What could be wrong? I thing is related with the base 64 enconded private api key but help me @kapa.ai ma boi
27 replies
WWasp-lang
Created by NEROX on 10/22/2024 in #🙋questions
Redirect WWW to not-WWW version
I had deployed on fly and with my custom domain (myweirdapp.com). I wanted to make sure that I don't have any www.myweridapp.com versions. At this moment every www url works in my app. I don't want that, I just want to have the non-www version. This www version should redirect to the non-www version. How can I archive this? Reason: Both versions of the URL are being indexed and making web scrappers dizzy.
46 replies
WWasp-lang
Created by NEROX on 10/19/2024 in #🙋questions
Exclude certain files or folders on Fly Deploy
I'm using Cursor charged with Wasp Docs and other docs inside @src/. I want to deploy some changes with Fly but I don't want the Wasp docs to be uploaded to my server. How can I exclude it somehow?
6 replies
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.
37 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?
9 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