arboleya / electrify

Package your Meteor apps with Electron, and butter
MIT License
247 stars 52 forks source link

A call to Random.id() within meteor/index.js #30

Closed consideRatio closed 8 years ago

consideRatio commented 8 years ago

I got this error:

    ReferenceError: Random is not defined

From this call within Meteor code:

    Electrify.call('hello.world', ['anderson', 'arboleya'], function(err, msg) {
        console.log(msg); // Hello anderson arboleya!
    });

The error originated from this place in meteor/index.js:

    var packet = {
            handshake: Random.id(),
            method: method,
            args: args
    };

I solved it by adding the random package to my meteor app like this:

    meteor add random

Perhaps electrify assumes that it is available to use within all meteor-codebase, but it is no longer because it has been separated as an optional package? Just speculating. I am using Meteor 1.2.1 on a Windows 7 computer.

arboleya commented 8 years ago

Yes, you're absolutely right, I've heard of this somewhere else.

I'm gonna include the random package as a dependency.

Thanks for reporting.

arboleya commented 8 years ago

Fixed in 1.2.1 - code