Estelle
Estelle
WWasp-lang
Created by Estelle on 10/29/2024 in #đŸ™‹questions
Number of connection per pool
I want to modify the number of connection per pool of Prisma database. Is it possible?
6 replies
WWasp-lang
Created by Estelle on 6/20/2024 in #đŸ™‹questions
Is it possible to use prisma clientExtensions?
13 replies
WWasp-lang
Created by Estelle on 6/20/2024 in #đŸ™‹questions
Using action in backend
Hello! https://wasp-lang.dev/docs/data-model/operations/actions#declaring-actions I see we can use action in the backend. I want to do so to avoid code duplication. How do you use the action in the backend? Do you have an example? In the front I just import it from wasp/client/operations and it works like a charm. But in backend I'm not really sure how to use it?
11 replies
WWasp-lang
Created by Estelle on 6/11/2024 in #đŸ™‹questions
Add extension postgis
I want to add the PostGIS extension to my db. I added this into my main.wasp :
db: {
system: PostgreSQL,
prisma: {
clientPreviewFeatures: ["postgresqlExtensions"],
dbExtensions: [
{ name: "postgis", version: "3" },
]
},
},
db: {
system: PostgreSQL,
prisma: {
clientPreviewFeatures: ["postgresqlExtensions"],
dbExtensions: [
{ name: "postgis", version: "3" },
]
},
},
Problem:
db error: ERROR: extension "postgis" has no installation script nor update path for version "3"
db error: ERROR: extension "postgis" has no installation script nor update path for version "3"
So I added the installation script:
docker ps
docker exec -it [container_id] bash
apt update
apt install postgis postgresql-16-postgis-3
docker ps
docker exec -it [container_id] bash
apt update
apt install postgis postgresql-16-postgis-3
I succeeded to add the extension manually in the local database with:
CREATE EXTENSION IF NOT EXISTS postgis;
CREATE EXTENSION IF NOT EXISTS postgis;
Problem:
Error: P3006

Migration `20240611131009_add_postgis_extension` failed to apply cleanly to the shadow database.
Error:
db error: ERROR: extension "postgis" has no installation script nor update path for version "3"
0: schema_core::state::DevDiagnostic
at schema-engine/core/src/state.rs:266



:x: --- [Error] Migrate dev failed: ------------------------------------------------

Migrate (dev) failed with exit code: 1

The shadow database doesn't have the script I added to the local database.
Error: P3006

Migration `20240611131009_add_postgis_extension` failed to apply cleanly to the shadow database.
Error:
db error: ERROR: extension "postgis" has no installation script nor update path for version "3"
0: schema_core::state::DevDiagnostic
at schema-engine/core/src/state.rs:266



:x: --- [Error] Migrate dev failed: ------------------------------------------------

Migrate (dev) failed with exit code: 1

The shadow database doesn't have the script I added to the local database.
So I tried something else : I buit my docker image with postgres16 + the script that I want to use locally so the database and the shadow database will have the script. I add to my env : DATABASE_URL=postgresql://postgres:mysecretpassword@localhost:5432/postgres But impossible to use my built database as "local" :
The database needs to be running in order to execute this command. You can easily start a managed dev database with `wasp start db`.
The database needs to be running in order to execute this command. You can easily start a managed dev database with `wasp start db`.
How can I add my extension please?
22 replies
WWasp-lang
Created by Estelle on 5/18/2024 in #đŸ™‹questions
Custom authRequired = true
I want to be able to check if a user has paid ("isActive" in db) before going into a specific page Ideally, I do not want to add it at the beginning of each page Do you have someting to maybe custom the authRequired in .wasp ? Or do you plan to add certain Layouts maybe? Thanks
10 replies
WWasp-lang
Created by Estelle on 5/16/2024 in #đŸ™‹questions
Bug wasp db studio
I have very often this when I run wasp db studio : [ Db ] Environment variables loaded from .env [ Db ] Prisma schema loaded from ../db/schema.prisma [ Db ] Prisma Studio is up on http://localhost:5555 [ Db !] node:internal/process/promises:288 [ Db !] triggerUncaughtException(err, true /* fromPromise */); [ Db !] ^ [ Db !] [ Db !] [Error: ENOENT: no such file or directory, rename '/Users/estellejacot/Library/Caches/checkpoint-nodejs/.81644.0' -> '/Users/estellejacot/Library/Caches/checkpoint-nodejs/prisma-studio-default'] { [ Db !] errno: -2, [ Db !] code: 'ENOENT', [ Db !] syscall: 'rename', [ Db !] path: '/Users/estellejacot/Library/Caches/checkpoint-nodejs/.81644.0', [ Db !] dest: '/Users/estellejacot/Library/Caches/checkpoint-nodejs/prisma-studio-default' [ Db !] } [ Db !] [ Db !] Node.js v18.18.0 Internal Wasp error (bug in compiler): This should never happen, studio should never stop. CallStack (from HasCallStack): error, called at cli/src/Wasp/Cli/Command/Db/Studio.hs:29:3 in waspc-0.12.1-inplace-cli-lib:Wasp.Cli.Command.Db.Studio Most of the time, I re-run exactly the same few times and it works again, but if you could fix it it would be nice! Thanks
30 replies
WWasp-lang
Created by Estelle on 5/6/2024 in #đŸ™‹questions
RollupError
I try to deploy but I have this error:
#0 7.556 [!] RollupError: Could not resolve "../../../../../src/libs/stripe/server/queries/setupIntentSecret" from "src/queries/setupIntentSecret.ts"
#0 7.556 src/queries/setupIntentSecret.ts
#0 7.556 at getRollupError (/app/.wasp/build/server/node_modules/rollup/dist/shared/parseAst.js:282:41)
#0 7.556 at Object.error (/app/.wasp/build/server/node_modules/rollup/dist/shared/parseAst.js:278:42)
#0 7.556 at ModuleLoader.handleInvalidResolvedId (/app/.wasp/build/server/node_modules/rollup/dist/shared/rollup.js:20197:36)
#0 7.556 at /app/.wasp/build/server/node_modules/rollup/dist/shared/rollup.js:20157:26
#0 7.556
#0 7.556
#0 7.556 [!] RollupError: Could not resolve "../../../../../src/libs/stripe/server/queries/setupIntentSecret" from "src/queries/setupIntentSecret.ts"
#0 7.556 src/queries/setupIntentSecret.ts
#0 7.556 at getRollupError (/app/.wasp/build/server/node_modules/rollup/dist/shared/parseAst.js:282:41)
#0 7.556 at Object.error (/app/.wasp/build/server/node_modules/rollup/dist/shared/parseAst.js:278:42)
#0 7.556 at ModuleLoader.handleInvalidResolvedId (/app/.wasp/build/server/node_modules/rollup/dist/shared/rollup.js:20197:36)
#0 7.556 at /app/.wasp/build/server/node_modules/rollup/dist/shared/rollup.js:20157:26
#0 7.556
#0 7.556
I saw your issue here: https://github.com/wasp-lang/wasp/issues/1830 But I don't know how to fix it What am I doing wrong?
10 replies
WWasp-lang
Created by Estelle on 5/4/2024 in #đŸ™‹questions
Use .env.client : The 'import.meta' meta-property is only allowed when the '--module' option is 'es2
I need to use env variables in my code and following the doc import.meta.env.REACT_APP_PUBLIC_STRIPE_PUBLIC_KEY get this error :
The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.ts(1343)
The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.ts(1343)
18 replies
WWasp-lang
Created by Estelle on 4/29/2024 in #đŸ™‹questions
Do I have a way to use useLazyQuery ?
My app filters some data. I need to be able to refetch whenever the user clicks on "search" with the new filters. I also don't need to fetch when the form is not dirty. I tried this :
const methods = useForm({ defaultValues });
const filters = methods.watch();

const {
data: properties = [],
isLoading,
isFetching,
refetch: filterProperties,
} = useQuery(getProperties, filters, { enabled: false });
const methods = useForm({ defaultValues });
const filters = methods.watch();

const {
data: properties = [],
isLoading,
isFetching,
refetch: filterProperties,
} = useQuery(getProperties, filters, { enabled: false });
But when I use filterProperties in another component it doesn't filters with the right filters. Is it a problem with react-hook-form? Or is it a problem with useQuery?
5 replies
WWasp-lang
Created by Estelle on 4/23/2024 in #đŸ™‹questions
Is it possible to customise titles of Auth component?
I create an app in french, I can't let it in english. I saw I can customize the colors but that's not enough.
5 replies
WWasp-lang
Created by Estelle on 4/23/2024 in #đŸ™‹questions
How can I custom the verification email content?
+ Can I use SendGrid template?
5 replies
WWasp-lang
Created by Estelle on 4/9/2024 in #đŸ™‹questions
Subscribing to database events with @prisma/extension-pulse
Is it possible to suscribe to database events with pulse for the moment? If not, how can I follow easily database event for the moment?
19 replies