mm
mm
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
the problem was I added setupFn: import {serverMiddlewareFn} from "@src/serverSetup", while importing the same function as the middlewareConfigFn that's why middlewareConfigFn was not detected. it's being executed from setupFn I guess
37 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
Hi @miho @martinsos found the problem. I just removed the setupFn since I'm not using it. What customizations can I do with setupFn btw.
server: {
// setupFn: import {serverMiddlewareFn} from "@src/serverSetup",
middlewareConfigFn: import { serverMiddlewareFn } from "@src/serverSetup"
},
server: {
// setupFn: import {serverMiddlewareFn} from "@src/serverSetup",
middlewareConfigFn: import { serverMiddlewareFn } from "@src/serverSetup"
},
37 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
Hi @miho not yet. haven't tried the bare-bones yet. busy with something else. will update you guys once I tried that one
37 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
No description
37 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
did you not get a console error? saying middleware config set not a
37 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
does the node version matter? I'm using v20
37 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
it really says middlewareconfig.set is not a function
37 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
Hi @miho it is located in app/src and yes named exactly like that
37 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
Hi @martinsos @miho do I need to provide the whole wasp file? Here are the code snippets wasp file
app OpenSaaS {
wasp: {
version: "^0.14.0"
},

title: "IntelTools",

.......

server: {
setupFn: import {serverMiddlewareFn} from "@src/serverSetup",
middlewareConfigFn: import { serverMiddlewareFn } from "@src/serverSetup"
},
app OpenSaaS {
wasp: {
version: "^0.14.0"
},

title: "IntelTools",

.......

server: {
setupFn: import {serverMiddlewareFn} from "@src/serverSetup",
middlewareConfigFn: import { serverMiddlewareFn } from "@src/serverSetup"
},
server setup
import express from 'express';
import { config, type MiddlewareConfigFn } from 'wasp/server';

export const serverMiddlewareFn: MiddlewareConfigFn = (middlewareConfig) => {
// Increase payload size limit
middlewareConfig.set('express.json', express.json({ limit: '100mb' }));
middlewareConfig.set('express.urlencoded', express.urlencoded({ limit: '100mb', extended: true }));

return middlewareConfig;
};
import express from 'express';
import { config, type MiddlewareConfigFn } from 'wasp/server';

export const serverMiddlewareFn: MiddlewareConfigFn = (middlewareConfig) => {
// Increase payload size limit
middlewareConfig.set('express.json', express.json({ limit: '100mb' }));
middlewareConfig.set('express.urlencoded', express.urlencoded({ limit: '100mb', extended: true }));

return middlewareConfig;
};
Error
[ Server ] pg-boss started!
[ Server!] TypeError: middlewareConfig.set is not a function
[ Server!] at serverMiddlewareFn (/Users/mm/code/intelhouse/inteltools/app/src/serverSetup.ts:6:20)
[ Server!] at startServer (/Users/mm/code/intelhouse/inteltools/app/.wasp/out/server/src/server.ts:25:10)
[ Server!] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[ Server ] pg-boss started!
[ Server!] TypeError: middlewareConfig.set is not a function
[ Server!] at serverMiddlewareFn (/Users/mm/code/intelhouse/inteltools/app/src/serverSetup.ts:6:20)
[ Server!] at startServer (/Users/mm/code/intelhouse/inteltools/app/.wasp/out/server/src/server.ts:25:10)
[ Server!] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
37 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
No description
37 replies
WWasp-lang
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
No description
27 replies
WWasp-lang
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
When I have the time I will try this out in a fresh opensaas setup. I kinda re-organized the directories for this project maybe that's causing this? though I'm not sure if it's supposed to be an issue.
27 replies
WWasp-lang
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
No description
27 replies
WWasp-lang
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
I'll check later after deployment. or can I run wasp start while deploying??
27 replies
WWasp-lang
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
these are the files that make uses the utils
27 replies
WWasp-lang
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
No description
27 replies
WWasp-lang
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
let me double check
27 replies
WWasp-lang
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
nope
27 replies
WWasp-lang
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
I only used it for jobs in this case
27 replies
WWasp-lang
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
I'm not using it directly inside a client code
27 replies