padolsey / operative

:dog2: Seamlessly create Web Workers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not work in Nodejs at all

mkeedlinger opened this issue · comments

Simply doesn't work at all.

I try to run op = require('operative');

and then I get this:

ReferenceError: self is not defined
    at /tmp/test/node_modules/operative/dist/operative.min.js:2:3132
    at Object.<anonymous> (/tmp/test/node_modules/operative/dist/operative.min.js:2:8598)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at repl:1:7
    at REPLServer.self.eval (repl.js:110:21)

This is for the latest version on NPM (just installed 5 mins ago).

Operative is not currently claiming support for non-browser environments. Operative mainly serves as a degradable abstraction for Web Workers (which don't exist in node.js), however I think it's reasonable to let one of the degraded modes be "node.js env" so I'll try to work this into 0.4.0.

Does this work in node now?