What causes this rollup error?
What causes this rollup error when running
wasp start
?
6 Replies
Hi @Sam79. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
The error message you're seeing is likely due to the way you're exporting your
serverSetup
function in your ServerSetup.ts
file.
In Wasp, if you define a serverSetup
function without arguments, it can cause the server to crash with a similar error message. This is because the serverSetup
function is expected to take one argument, which is the context.
Here's an example of how you might be defining your serverSetup
function:
To fix this error, you should modify your serverSetup
function to take a context
argument, like so:
This issue was discussed in a Github issue (https://github.com/wasp-lang/wasp/issues/1035) on the Wasp repository. The issue was closed, indicating that the solution provided was effective.
Please try this solution and let me know if it resolves your issue.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Sam79, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?@kapa.ai setup is like this:
@kapa.ai is that correct?
Let me check the knowledge base for you. One moment! :books:
----------------------
Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain information about the specific Rollup error you're encountering when running
wasp start
.
For more detailed help, I would recommend checking the Wasp documentation (https://wasp-lang.dev/docs) or the Wasp GitHub repository (https://github.com/wasp-lang/wasp) for similar issues.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Sam79, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?@kapa.ai I changed the code slightly which stopped the problem. I then changed it back again and the problem has gone away. I can only assume it occurs randomly. Is it a bug?
@kapa.ai what is your diagnosis?
Let me check the knowledge base for you. One moment! :books:
----------------------
I'm sorry, but I can't provide a diagnosis for the Rollup error you're experiencing. The knowledge sources provided do not contain information about this specific issue. For more detailed help, I recommend checking the Wasp documentation (https://wasp-lang.dev/docs) or the Wasp GitHub repository (https://github.com/wasp-lang/wasp) for similar issues.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Sam79, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
Hi @Sam79, I'm guessing you mixed a default import with a named export.
If you use a default export in
serverSetup.ts
, you must use a default import in main.wasp
.
If you use a named export in serverSetup.ts
, you must use a named import in main.wasp
.
I see you've used a named export in serverSetup.ts
:
And I'm guessing you used a default import in main.wasp
:
While the correct form in your case would be this (notice the curly braces):