genyus
genyus
WWasp
Created by Gwaggli on 2/21/2025 in #🙋questions
Setting NODE_ENV to 'test'
The only valid values for NODE_ENV are "development" or "production"; you must use one of those.
8 replies
WWasp
Created by david.fejes on 3/12/2024 in #🙋questions
Object relation doesn't compile to TypeScript
No problem, you're welcome 👍🏾
28 replies
WWasp
Created by david.fejes on 3/12/2024 in #🙋questions
Object relation doesn't compile to TypeScript
Thanks for sharing your repo, made it easier to debug. I've raised a PR, but for visibility, the root cause was that you were using the wrong operations in your functions, e.g.:
export const assignTagToTask: UpdateTask<AssignTagToTaskPayload, Task> = async (
{ taskId, tagId },
context
)
export const assignTagToTask: UpdateTask<AssignTagToTaskPayload, Task> = async (
{ taskId, tagId },
context
)
instead of:
export const assignTagToTask: AssignTagToTask<AssignTagToTaskPayload, Task> = async (
{ taskId, tagId },
context
)
export const assignTagToTask: AssignTagToTask<AssignTagToTaskPayload, Task> = async (
{ taskId, tagId },
context
)
This might've been a copy-and-paste issue, but reusing operations like this isn't valid. While not an error, you were also importing unused entities, which I removed. You only need to declare an entity in main.wasp if you need to execute a db operation on it in your function. The entity isn't required if you're just returning another type through a relation.
28 replies
WWasp
Created by david.fejes on 3/12/2024 in #🙋questions
Object relation doesn't compile to TypeScript
Apologies, I assumed you were using explicit relations as that was the approach of the OP. Reading your query again, you’re using select: { tags: true }, but it should be include: { tags: true }. select is for returning specific fields, not including entire relations, which it appears you want to do here.
28 replies
WWasp
Created by david.fejes on 3/12/2024 in #🙋questions
Object relation doesn't compile to TypeScript
If your tasks and tags have a many-to-many relationship, there must be a join entity which you'd need to include, but isn't shown here. Can you share the relevant entity definitions?
28 replies
WWasp
Created by isaiah on 2/19/2025 in #🙋questions
main.wasp.ts related
I just created a fresh, default app and checked wasp clean && wasp start worked as expected. I migrated to the TS config and can confirm that the same command sequence fails with the "This is not the tsc command you are looking for" error message. A clean restart now requires wasp clean && npm install && wasp start
19 replies
WWasp
Created by isaiah on 2/19/2025 in #🙋questions
main.wasp.ts related
19 replies
WWasp
Created by isaiah on 2/19/2025 in #🙋questions
main.wasp.ts related
After running the ts-setup command, you should see wasp-config listed in your devDependencies. Confirm that it’s present, then run npm install and reset the TS language server in your editor, via the Command Palette.
19 replies
WWasp
Created by SilveR on 2/16/2025 in #🙋questions
SDK Build failing even after setting up DB commands
So this may or may not be helpful, but I’ve encountered this same error; I think when I started experimenting with the new TS config. I found that I needed to run npm install after wasp clean to ensure everything works correctly when Wasp compiles the project, e.g.:
{
"scripts": {
"clean": "wasp clean && npm install"
}
}
{
"scripts": {
"clean": "wasp clean && npm install"
}
}
I’m also on macOS, running Node v23
24 replies
WWasp
Created by Kerry Ritter on 2/15/2025 in #🙋questions
Restarting language server constantly?
Yup. I use Cursor (and Windsurf) too, so I understand just how annoying it can be 😅
14 replies
WWasp
Created by Kerry Ritter on 2/15/2025 in #🙋questions
Restarting language server constantly?
I experienced the same issue, my solution was to install this extension. I modified the Typescript file glob as follows (ensure you add the tsbuildinfo extension to the default list):
{
"autoRestart.fileGlobForTypescript": [
"**/node_modules/.prisma/client/index.d.ts",
"**/tsconfig.{json,app.json,app.js,js,ts,tsbuildinfo}"
],
}
{
"autoRestart.fileGlobForTypescript": [
"**/node_modules/.prisma/client/index.d.ts",
"**/tsconfig.{json,app.json,app.js,js,ts,tsbuildinfo}"
],
}
So the TLS now automatically restarts every time the Prisma client or Wasp output gets modified. You'll probably also want to disable the extension's notifications.
14 replies
WWasp
Created by pipas on 2/15/2025 in #🙋questions
Questions About Transitioning from Next.js to Wasp and Alternative Services for a SaaS Project
i want to know how hard it is to transition from nextjs to wasp?
I think this is quite subjective, but if you can build a Next app, you can probably build a Wasp one
Also can i switch the s3 amazon file handler to cloudflare r2 easly in the code?
This one for sure is easy, you can use the AWS SDK and just set the relevant URL for R2
also open ai api to gemini api.
The Gemini API is also compatible with OpenAI
9 replies
WWasp
Created by Noah on 2/13/2025 in #🙋questions
How to import enums from prisma?
Great, thanks. I did try importing the enums initially and discovered that wouldn't work, so I use const object literals with the same values for value checking instead.
12 replies
WWasp
Created by Noah on 2/13/2025 in #🙋questions
How to import enums from prisma?
@miho Can I just check something? I'm importing Prisma enum types in client-side code for type checking, e.g. JobActions.tsx:
import type { JobListingStatus as PrismaJobListingStatus } from '@prisma/client';

interface JobActionsProps {
handleStatusChange: (id: string, status: PrismaJobListingStatus) => Promise<void>;
status: PrismaJobListingStatus;
}
import type { JobListingStatus as PrismaJobListingStatus } from '@prisma/client';

interface JobActionsProps {
handleStatusChange: (id: string, status: PrismaJobListingStatus) => Promise<void>;
status: PrismaJobListingStatus;
}
Is this a practise I should avoid?
12 replies
WWasp
Created by Killshot on 2/12/2025 in #🙋questions
Getting 404 error from Plausible self hosted instance.
The cloud-hosted base URL includes the /api path, have you tried appending that to yours?
15 replies
WWasp
Created by Sean on 2/10/2025 in #🙋questions
APIs keep returning 404 error
In addition to setting the correct port, I think you also need to double-check your callback URL path in Notion. You said:
After authorizing Notion, it redirects to http://localhost:3000/api/auth/notion/callback?code=03ed839c-59bf-41a9-9d9b-e4a5697e9d03&state=
But you’ve defined your route as:
//#region Notion Integration
api NotionOAuthCallback {
fn: import { notionOAuthCallback } from "@src/server/notion",
httpRoute: (GET, "/auth/notion/callback")
}
//#endregion
//#region Notion Integration
api NotionOAuthCallback {
fn: import { notionOAuthCallback } from "@src/server/notion",
httpRoute: (GET, "/auth/notion/callback")
}
//#endregion
So the URL should actually be http://localhost:3001/auth/notion/callback
30 replies
WWasp
Created by Kynetix on 2/8/2025 in #🙋questions
Port 5432 is already in use
When you set DATABASE_URL, that tells Wasp you're using an unmanaged (external) database, so you shouldn't run wasp start db as long as that variable is set. Just run wasp start and it'll connect to the database you've configured.
10 replies
WWasp
Created by ayo on 1/24/2025 in #🙋questions
multiple client url
Glad it helped. That line's apparently caught out a few folks, I raised a PR to fix it in the docs
10 replies
WWasp
Created by ayo on 1/24/2025 in #🙋questions
multiple client url
Remove this line from main.wasp:
setupFn: import setup from "@src/serverSetup",
setupFn: import setup from "@src/serverSetup",
10 replies
WWasp
Created by fustuk. on 9/16/2024 in #🙋questions
Backend public?
Just saw another user encounter this same issue, the code snippet is indeed present in the docs. PR submitted.
58 replies