Search code examples
node.jsmeteorddp

proxies not supported on this platform


i'm trying to make(i don't know what it's called, hot load? hot reload?) Meteor-like real-time loading of data, but by using node.js not Meteor.
and i'm using the ddp module for the client(=browser, i have not tried it yet) and ddp-reactive-server, well, for the server.

server.js is like this:

var DDPServer = require('ddp-server-reactive');

var server = new DDPServer();



var todoList = server.publish('todolist');    

after that i run the server using the command node server.js --harmony_proxies(notice i'm already using the flag) this is what i get:

[aseds@localhost ~]$ node server.js --harmony_proxies
/home/aseds/Desktop/projeh/css-goodness/node_modules/harmony-reflect/reflect.js:2049
      throw new Error("proxies not supported on this platform. On v8/node/iojs, make sure to pass the --harmony_proxies flag");
      ^

Error: proxies not supported on this platform. On v8/node/iojs, make sure to pass the --harmony_proxies flag
    at global.Proxy (/home/aseds/Desktop/projeh/css-goodness/node_modules/harmony-reflect/reflect.js:2049:13)
    at publish (/home/aseds/Desktop/projeh/css-goodness/node_modules/ddp-server-reactive/lib.js:211:32)
    at Object.<anonymous> (/home/aseds/Desktop/projeh/css-goodness/ddpserver.js:10:23)
    at Module._compile (module.js:397:26)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:429:10)
    at startup (node.js:139:18)
    at node.js:999:3

my nodejs version v5.4.1. i'm not even sure if that's actually possible to make the automatic reload feature of Meteor this way but i'm trying! :)

Thanks in advance for any help you are able to provide.


Solution

  • I came across this thread with regards to --harmony-proxies:

    https://github.com/tvcutsem/harmony-reflect/issues/56

    The relevant bit:

    I released version 1.4.0 which, when loaded twice according to the script outlined above, loads correctly.

    Note that loading v1.3.1 of this library followed by v1.4.0 will still fail (the other way around works fine). So it's important that your dependencies upgrade to the latest version.

    It appears that if harmony-proxies is loaded as a node dependency twice, with different versions required, and a version before 1.4.0 is loaded first, then you will see this error.