pgriess / node-webworker

A WebWorkers implementation for NodeJS
BSD 3-Clause "New" or "Revised" License
646 stars 84 forks source link

Object is not a function on first tick #24

Open psema4 opened 13 years ago

psema4 commented 13 years ago

Running the example from the README (node v0.4.7), I get:

scott@vscott:~/devel/js/node/webworker-tests$ ./master.js 

node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
TypeError: object is not a function
    at Object.CALL_NON_FUNCTION_AS_CONSTRUCTOR (native)
    at Object.<anonymous> (/home/scott/devel/js/node/webworker-tests/master.js:6:9)
    at Module._compile (module.js:404:26)
    at Object..js (module.js:410:10)
    at Module.load (module.js:336:31)
    at Function._load (module.js:297:12)
    at Array.<anonymous> (module.js:423:10)
    at EventEmitter._tickCallback (node.js:126:26)

Module was installed globally using npm 1.0.6.

Additionally, the readme says websocket-client 0.9.3 or later is required, package.json (on github) says 0.9.3 - 0.9.9999, and my package.json (from npm) does not have a dependencies entry.

I installed the latest version of websocket-client (1.0.0) globally using npm but it had no effect on the above error.

KarlHerler commented 13 years ago

I get the same error from a clean NPM install with webworker 0.8.3 (and websocket-client 0.9.5) on node 0.4.2.