Noah
Noah
WWasp
Created by Noah on 2/20/2025 in #đŸ™‹questions
New error in deployment
[!] Error: Could not load /app/.wasp/out/sdk/wasp/dist/server/index.js (imported by src/server.ts): ENOENT: no such file or directory, open '/app/.wasp/out/sdk/wasp/dist/server/index.js'

Error: Could not load /app/.wasp/out/sdk/wasp/dist/server/index.js (imported by src/server.ts): ENOENT: no such file or directory, open '/app/.wasp/out/sdk/wasp/dist/server/index.js'
[!] Error: Could not load /app/.wasp/out/sdk/wasp/dist/server/index.js (imported by src/server.ts): ENOENT: no such file or directory, open '/app/.wasp/out/sdk/wasp/dist/server/index.js'

Error: Could not load /app/.wasp/out/sdk/wasp/dist/server/index.js (imported by src/server.ts): ENOENT: no such file or directory, open '/app/.wasp/out/sdk/wasp/dist/server/index.js'
I don't see a src/server.ts in my codebase, any ideas here?
10 replies
WWasp
Created by Noah on 2/19/2025 in #đŸ™‹questions
Examples of creating session with wasp 0.16.0
I want to create a user session via Wasp's auth hooks, but I can't find any good examples of using the existing auth utils. In old code snippets I see references to createSession but I can't find that anymore. Any suggested reading?
11 replies
WWasp
Created by Noah on 2/17/2025 in #đŸ™‹questions
Passwordless login?
Wondering if there's a flow where users can claim accounts when invited, without needing to fully sign up first?
6 replies
WWasp
Created by Noah on 2/16/2025 in #đŸ™‹questions
React 19 support?
Im considering upgrading to react 19, curious if there is a paved road in wasp for that or if anyone has experience
7 replies
WWasp
Created by Noah on 2/15/2025 in #đŸ™‹questions
Per-Path Middleware for actions/operations
I'd like to configure middleware for a set of actions + ops re these docs https://wasp.sh/docs/advanced/middleware-config#3-customize-per-path-middleware But it looks like a simple URL prefix check which seems to only apply on apis in wasp, not ops or actions.
6 replies
WWasp
Created by Noah on 2/13/2025 in #đŸ™‹questions
How to import enums from prisma?
I have an enum defined in my prisma file, but import { User , OrganizationUserRole} from 'wasp/entities'; isn't working
12 replies
WWasp
Created by Noah on 2/9/2025 in #đŸ™‹questions
Supporting decimals in prisma schema
My schema has fields like so:
model PaymentRule {
id String @id @default(uuid())
venueId String
venue Venue @relation(fields: [venueId],
pricePerHour Decimal
}
model PaymentRule {
id String @id @default(uuid())
venueId String
venue Venue @relation(fields: [venueId],
pricePerHour Decimal
}
Then when I write an operation to fetch Payment rules, I get the following error:
export const getVenueById: GetVenueById<
GetVenueByIdPayload,
(Venue & { spaces: Space[]; availabilityRules: AvailabilityRule[]; paymentRules: PaymentRule[] }) | null
> = async (args, context) => {
return context.entities.Venue.findFirst({
where: { id: args.venueId },
include: {
spaces: true,
availabilityRules: true,
paymentRules: true,
},
});
};
export const getVenueById: GetVenueById<
GetVenueByIdPayload,
(Venue & { spaces: Space[]; availabilityRules: AvailabilityRule[]; paymentRules: PaymentRule[] }) | null
> = async (args, context) => {
return context.entities.Venue.findFirst({
where: { id: args.venueId },
include: {
spaces: true,
availabilityRules: true,
paymentRules: true,
},
});
};
Property 'paymentRules' is incompatible with index signature.
Type '{ id: string; venueId: string; spaceIds: string[]; priority: number; ruleType: RuleType; pricePerHour: Decimal | null; multiplier: Decimal | null; discountRate: Decimal | null; ... 8 more ...; updatedAt: Date; }[]' is not assignable to type 'SuperJSONValue'.
...
Property 'pricePerHour' is incompatible with index signature.
Type 'Decimal | null' is not assignable to type 'SuperJSONValue'.
Type 'Decimal' is not assignable to type 'SuperJSONValue'.
Type 'Decimal' is not assignable to type 'SuperJSONObject'.
Index signature for type 'string' is missing in type 'Decimal'.ts(2344)
Property 'paymentRules' is incompatible with index signature.
Type '{ id: string; venueId: string; spaceIds: string[]; priority: number; ruleType: RuleType; pricePerHour: Decimal | null; multiplier: Decimal | null; discountRate: Decimal | null; ... 8 more ...; updatedAt: Date; }[]' is not assignable to type 'SuperJSONValue'.
...
Property 'pricePerHour' is incompatible with index signature.
Type 'Decimal | null' is not assignable to type 'SuperJSONValue'.
Type 'Decimal' is not assignable to type 'SuperJSONValue'.
Type 'Decimal' is not assignable to type 'SuperJSONObject'.
Index signature for type 'string' is missing in type 'Decimal'.ts(2344)
How to resolve??
10 replies
WWasp
Created by Noah on 2/7/2025 in #đŸ™‹questions
How can I access the current server URL from a wasp operation?
In a http request I could do req.headers.origin, but how do I get that from an operation?
6 replies
WWasp
Created by Noah on 1/31/2025 in #đŸ™‹questions
What's the best way to run fly deploy with arguments?
I'm trying to run wasp deploy fly deploy --depot=false to work around an issue with flyctl depot https://community.fly.io/t/hanging-on-waiting-for-depot-builder/23674 When I run fly alone i get other errors which tells me i'm missing somehting:
fly deploy -a block-spot-client
==> Verifying app config
Validating --config path unset--
✓ Configuration is valid
--> Verified app config
==> Building image
==> Building image
Error: failed to fetch an image or build from source: app does not have a Dockerfile or buildpacks configured. See https://fly.io/docs/reference/configuration/#the-build-section
fly deploy -a block-spot-client
==> Verifying app config
Validating --config path unset--
✓ Configuration is valid
--> Verified app config
==> Building image
==> Building image
Error: failed to fetch an image or build from source: app does not have a Dockerfile or buildpacks configured. See https://fly.io/docs/reference/configuration/#the-build-section
20 replies
WWasp
Created by Noah on 1/25/2025 in #đŸ™‹questions
What are best practices for tweaking caching for react-query through wasp?
Looking for a query usage example that includes caching
27 replies
WWasp
Created by Noah on 1/24/2025 in #đŸ™‹questions
Is it possible to get extra fields including joins returned from `useAuth`
I.e I want to request user org permissions, which is only available via a join
7 replies
WWasp
Created by Noah on 1/23/2025 in #đŸ™‹questions
Where can I find a complete reference of the available options in main.wasp?
Specifically i'm looking to see if there's any cookie settings. This is my chatGPT question and it might be hallucinating but it's hard to tell https://chatgpt.com/share/67928d8d-eb2c-8012-97f3-9ef9c1f7a161
6 replies