Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: Empty config file isn't supported #2488

Closed
RafidMuhymin opened this issue Jan 28, 2022 · 2 comments
Closed

🐛 BUG: Empty config file isn't supported #2488

RafidMuhymin opened this issue Jan 28, 2022 · 2 comments
Assignees

Comments

@RafidMuhymin
Copy link
Member

What version of astro are you using?

0.22.19

What package manager are you using?

pnpm

What operating system are you using?

Ubuntu

Describe the Bug

Astro throws the following error if there's an empty astro.config.js file present or if the config file doesn't have a default export.

TypeError: Cannot convert object to primitive value

No error is thrown if there's no astro.config.js file present.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-tz7qbv?file=astro.config.mjs&on=stackblitz

@jonathantneal
Copy link
Contributor

Verified. I agree this seems like a bug. However, I want to point out that if no astro configuration file is present, then the error does not persist.

@FredKSchott
Copy link
Member

Thanks @RafidMuhymin!
Moved to proload repo: natemoo-re/proload#8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants