Sam79
Sam79
WWasp-lang
Created by Sam79 on 8/25/2024 in #đŸ™‹questions
What causes this rollup error?
What causes this rollup error when running wasp start?
[!] RollupError: src/server.ts (6:7): "default" is not exported by "../../../src/ServerSetup.ts", imported by "src/server.ts".
[ Server!] https://rollupjs.org/troubleshooting/#error-name-is-not-exported-by-module
[ Server!] src/server.ts (6:7)
[!] RollupError: src/server.ts (6:7): "default" is not exported by "../../../src/ServerSetup.ts", imported by "src/server.ts".
[ Server!] https://rollupjs.org/troubleshooting/#error-name-is-not-exported-by-module
[ Server!] src/server.ts (6:7)
15 replies
WWasp-lang
Created by Sam79 on 8/25/2024 in #đŸ™‹questions
Why doesn't console.log output anything to terminal?
I am trying to debug cors middleware setup. In main.wasp I have:
server: {
setupFn: import setup from "@src/ServerSetup",
middlewareConfigFn: import { serverMiddlewareFn } from "@src/ServerSetup"
}
server: {
setupFn: import setup from "@src/ServerSetup",
middlewareConfigFn: import { serverMiddlewareFn } from "@src/ServerSetup"
}
In ServerSetup.ts for testing I have:
export const serverMiddlewareFn: MiddlewareConfigFn = (middlewareConfig) => {
console.log("nothing is shown in the console log")
middlewareConfig.set('cors', cors({ origin: [config.frontendUrl] }))
return middlewareConfig
}
export const serverMiddlewareFn: MiddlewareConfigFn = (middlewareConfig) => {
console.log("nothing is shown in the console log")
middlewareConfig.set('cors', cors({ origin: [config.frontendUrl] }))
return middlewareConfig
}
Since I see no output it looks like serverMiddlewareFn is never called.
6 replies
WWasp-lang
Created by Sam79 on 8/21/2024 in #đŸ™‹questions
Can't connect to WASP WebSocket's on Intranet
I'm using WASP 0.14.0 on Mac OS 14.6 and am trying to run the WebSocket example: https://wasp-lang.dev/docs/advanced/web-sockets so that its available on my intranet. However, I can only connect to it on the machine itself with localhost (which works ok). I tried a Socket IO example socket.io-chat-platform and was able to get that working on my network so I know it's not a Firewall issue. Also HTTP access to the WASP app on the network works ok. How can I run the WASP app so WebSockets work on the network?
16 replies