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] Multiple cron jobs in a single file #88

Open
Mateleo opened this issue Nov 1, 2024 · 2 comments
Open

[BUG] Multiple cron jobs in a single file #88

Mateleo opened this issue Nov 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Mateleo
Copy link

Mateleo commented Nov 1, 2024

Version

1.7.0

Describe the problem

In job.ts, the system expects a default export. However, I want to consolidate all my cron jobs in a single file, which makes a default export unfeasible. This results in an error, as shown in the screenshot below.

Additional info

 ERROR  RollupError: .nuxt/cron-handler.ts (3:0): "default" is not exported by "server/cron/job.ts", imported by ".nuxt/cron-handler.ts".                                                                          nitro 16:06:32  


1:
2:           import { createCronHandler } from 'C:/Informatique/Volubilis/node_modules/.pnpm/[email protected]_magicast@0....
3:           import cronJob0 from 'C:/Informatique/Volubilis/server/cron/job'
   ^
4:
5:           export default defineNitroPlugin((nitro) => {
@Mateleo Mateleo added the bug Something isn't working label Nov 1, 2024
@hywax-assistant
Copy link
Collaborator

👋 @Mateleo
Thanks for opening your first issue here!
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

If you like this project, please ⭐ star our repo.

@Mateleo Mateleo changed the title [BUG] <title> [BUG] Multiple cron jobs in a single file Nov 1, 2024
@Mateleo
Copy link
Author

Mateleo commented Nov 1, 2024

Wow he's quick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants