Closed Banjer71 closed 6 months ago
You need to use const Bree = require('bree')
as noted in our README. Please read the README before filing GitHub issues and spamming users.
@titanism
const Bree = require('bree') I did it already and I was getting another error node:internal/process/promises:289 triggerUncaughtException(err, true / fromPromise /); ^
[Error: ENOENT: no such file or directory, stat 'C:\Users\Davide\Desktop\Lyrics Bites\mern\Lyrics-bites-backend-v2\jobs'] { errno: -4058, code: 'ENOENT', syscall: 'stat', path: 'C:\Users\Davide\Desktop\Lyrics Bites\mern\Lyrics-bites-backend-v2\jobs' }
Again, you need to read the README. It's looking for a folder called jobs
which you have to create. See the README (CMD+F/CTRL+F for "jobs").
Describe the bug
Node.js version: Node v18.7.0
OS version: Windows 10
Description: I am getting this error TypeError: Bree is not a constructor. The script is below , I searched online but I did not get any useful solutions
Code to reproduce
` const { Bree } = require("bree"); const bree = new Bree({ jobs: [ { name: 'sendVerseEmails', interval: '1 minute', worker: async () => { // get songs with verses const songs = await SplittedLyrics.find({ verses: { $exists: true } });
], }); `
Checklist