RollupError: Invalid value for option "output.file"
I stumbled uppon this issue, I started a new project and not sure what I did wrong but I ended up with this error that crashes the whole app and I cant do much more after.
I havent updated package.json, I reverted my main.wasp changes as well, I havent really touched anything config related, I ran
wasp clean && wasp start
, still the same issue6 Replies
Hi @fustuk.. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
The error you're seeing:
indicates that Rollup is being asked to output multiple chunks (likely due to dynamic imports or multiple entry points), but the configuration is using
output.file
instead of output.dir
. When multiple chunks are generated, Rollup requires output.dir
to specify the output directory.
Based on the knowledge sources, there is no explicit documentation or community thread addressing this exact Rollup configuration error in Wasp. However, here are some relevant points:
- Wasp uses Rollup internally for bundling the server code, and this process is typically not something users need to configure directly.
- If you haven't changed any config files (like rollup.config.js
or similar), and you reverted your main.wasp
changes, this error could be due to a bug or a corrupted state in the generated files.
- Running wasp clean && wasp start
is the correct first step, as it removes generated files and reinstalls dependencies, but you've already tried this.
Given that you started a new project and haven't changed config files, this error should not normally occur. There is no direct solution in the knowledge sources, but here are some steps you can try, based on general troubleshooting advice from the Wasp community:
1. Double-check that you are using the latest version of Wasp. You can update Wasp with:
Error building after migrating Wasp to 0.12 > Answers Part 4
2. If the problem persists, it may be a bug in Wasp's project generation or build process. In that case, consider opening an issue on the Wasp GitHub repository and include the error message and steps to reproduce.
3. If you have any custom Vite or Rollup config files in your project root (like vite.config.ts
or rollup.config.js
), try temporarily removing or renaming them to see if the error resolves, as custom configs can sometimes interfere with Wasp's defaults Custom Vite Config.
Unfortunately, the knowledge sources do not contain a direct fix for this specific Rollup error in a fresh Wasp project. If none of the above helps, please provide more details or share your project with the Wasp team for further investigation.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @fustuk., 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 how can I update my wasp instance and what is the current lts version
Let me check the knowledge base for you again. One moment! :books:
----------------------
To update your Wasp instance, you should re-run the installer script. You can do this with the following command:
If you want to install or switch to a specific version of Wasp, you can specify the version like this:
Replace
x.y.z
with the desired version number. You can find the list of valid versions, including the latest one, at Wasp releases on GitHub CLI Reference – Miscellaneous Commands.
As for the current LTS version of Wasp, the knowledge sources do not specify the exact latest LTS version. However, you can always check your current version and get instructions for updating by running:
This command will display your current Wasp version and provide update instructions. For the most up-to-date version, refer to the Wasp releases page.
If you need to know the required Node.js LTS version for Wasp, recent discussions indicate that Node.js 20 LTS support is being added, but at the time of the latest sources, Wasp required Node.js ^18.12.0. Please check the requirements section in the docs for the most current information Upgrade Node version requirement to 20.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @fustuk., 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?same issue on latest version
fixed it, had to update
app/.wasp/out/server/rollup.config.js
Hey @fustuk., how did you end up editing the rollup.config.js? Can you try doing wasp clean and see if everything is alright?
Hey, I did edit it manualy in order for it to work, wasp clean & install was not fixing it, it was still missing the last field