Skip to content

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

@Mateleo

Description

@Mateleo

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) => {

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions