hywax / nuxt-cron

A Nuxt module for cron jobs in your app.
https://nuxt-cron.hywax.space
MIT License
66 stars 3 forks source link

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

Open Mateleo opened 3 weeks ago

Mateleo commented 3 weeks ago

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/nuxt-cron@1.7.0_magicast@0....
3:           import cronJob0 from 'C:/Informatique/Volubilis/server/cron/job'
   ^
4:
5:           export default defineNitroPlugin((nitro) => {
hywax-assistant commented 3 weeks ago

👋 @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 commented 3 weeks ago

Wow he's quick