How to use with Meteor ?
See original GitHub issueI’m trying to use the library with Meteor but somehow the jobs are not starting:
import { Meteor } from "meteor/meteor";
import Bree from "bree";
import Graceful from "@ladjs/graceful";
const bree = new Bree({
jobs: [
{
name: "checkingjobs",
interval: "5s",
},
],
});
const graceful = new Graceful({ brees: [bree] });
Meteor.startup(function () {
graceful.listen();
bree.start();
});
In the same folder (./server) I have a jobs folder and a checkingjobs.js file with the following:
console.log("trigger jobs");
And I am getting the following error:
W20210226-13:37:45.664(1)? (STDERR) /Users/ivonig/.meteor/packages/meteor-tool/.1.10.2.p99aru.7e2ej++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20210226-13:37:45.665(1)? (STDERR) throw(ex);
W20210226-13:37:45.666(1)? (STDERR) ^
W20210226-13:37:45.681(1)? (STDERR)
W20210226-13:37:45.682(1)? (STDERR) Error: ENOENT: no such file or directory, stat '/Users/ivonig/Collock/revolin/.meteor/local/build/programs/server/jobs'
W20210226-13:37:45.683(1)? (STDERR) at Object.statSync (fs.js:932:3)
W20210226-13:37:45.685(1)? (STDERR) at new Bree (/Users/ivonig/Collock/revolin/node_modules/bree/lib/index.js:180:24)
W20210226-13:37:45.688(1)? (STDERR) at module (server/bree.js:187:14)
W20210226-13:37:45.689(1)? (STDERR) at fileEvaluate (packages/modules-runtime.js:336:7)
W20210226-13:37:45.690(1)? (STDERR) at Module.require (packages/modules-runtime.js:238:14)
W20210226-13:37:45.690(1)? (STDERR) at Module.moduleLink [as link] (/Users/ivonig/.meteor/packages/modules/.0.15.0.quoprd.p4uvg++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/reify/lib/runtime/index.js:52:22)
W20210226-13:37:45.690(1)? (STDERR) at module (server/main.js:1:1)
W20210226-13:37:45.691(1)? (STDERR) at fileEvaluate (packages/modules-runtime.js:336:7)
W20210226-13:37:45.691(1)? (STDERR) at Module.require (packages/modules-runtime.js:238:14)
W20210226-13:37:45.692(1)? (STDERR) at require (packages/modules-runtime.js:258:21)
W20210226-13:37:45.692(1)? (STDERR) at /Users/ivonig/Collock/revolin/.meteor/local/build/programs/server/app/app.js:10099:15
W20210226-13:37:45.692(1)? (STDERR) at /Users/ivonig/Collock/revolin/.meteor/local/build/programs/server/boot.js:401:38
W20210226-13:37:45.693(1)? (STDERR) at Array.forEach (<anonymous>)
W20210226-13:37:45.693(1)? (STDERR) at /Users/ivonig/Collock/revolin/.meteor/local/build/programs/server/boot.js:226:21
W20210226-13:37:45.693(1)? (STDERR) at /Users/ivonig/Collock/revolin/.meteor/local/build/programs/server/boot.js:464:7
W20210226-13:37:45.693(1)? (STDERR) at Function.run (/Users/ivonig/Collock/revolin/.meteor/local/build/programs/server/profile.js:280:14) {
W20210226-13:37:45.693(1)? (STDERR) errno: -2,
W20210226-13:37:45.693(1)? (STDERR) syscall: 'stat',
W20210226-13:37:45.695(1)? (STDERR) code: 'ENOENT',
W20210226-13:37:45.695(1)? (STDERR) path: '/Users/ivonig/Collock/revolin/.meteor/local/build/programs/server/jobs'
W20210226-13:37:45.695(1)? (STDERR) }
I tried to add root : false to the Bree constructor such as:
const bree = new Bree({
root: false,
jobs: [
{
name: "checkingjobs",
interval: "5s",
},
],
});
But I am then getting the following error:
W20210226-13:40:14.037(1)? (STDERR) Error: Job #1 named “checkingjobs” requires root directory option to auto-populate path
not sure what’s the issue there but couldn’t find any meteor integration. Thanks in advance.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Meteor Guide: Introduction
Meteor allows you to develop in one language, JavaScript, in all environments: application server, web browser, and mobile device. · Meteor uses data...
Read more >How to use Meteor Client : r/minecraftclients - Reddit
put the meteorclient jar in your modsfolder and start minecraft with the right fabri version. then once your minecraft starts, ...
Read more >X - How do I install Meteor?
X How do I install Meteor? · Download the Meteor Client, choosing one of two options: · Create a Fabric instance in your...
Read more >A Beginner's Guide to Meteor Methods
But when the “createPlayer” method is executed on the client, Meteor “guesses” what the method is trying to do on the server and...
Read more >Meteor - Quick Guide - Tutorialspoint
Meteor is a full-stack JavaScript platform for developing modern web and mobile applications. Meteor includes a key set of technologies for building ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Without
root: false
, bree is looking for the file, however the file doesn’t exist. Is.meteor/local/build/programs/server/jobs
where the file is stored? If not, that is likely due to Meteor not copying the jobs folder during the build process which would make it an issue with Meteor or your configurations with Meteor.If you use
root:false
, every job needs it’s own path.I think @idmadj has summed this up tremendously. If anybody wants to build a Meteor integration, we will gladly help in any way we can.