broofa/node-uuid — Issue #30: node-uuid 1.3.2 not working with node v0.4.12
Author: gavinuhma
Created: 2012-01-02 19:38:43+00:00
State: open

crypto.randomBytes wasn't added until node v0.6.0. The compatibility check (try/catch) doesn't work.

_rb gets set as undefined and doesn't fail until it's later called (outside of the try/catch).

https://github.com/broofa/node-uuid/blob/master/uuid.js#L44

resulting error:

node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: undefined is not a function
at CALL_NON_FUNCTION (native)
at /app/node_modules/node-uuid/uuid.js:47:14
at /app/node_modules/node-uuid/uuid.js:103:20
at Object. (/app/node_modules/node-uuid/uuid.js:249:1)
at Module._compile (module.js:411:26)
at Object..js (module.js:417:10)
at Module.load (module.js:343:31)
at Function._load (module.js:302:12)
at require (module.js:355:19)