Skip to content

TypeError: undefined is not a function #2

Open
wavded opened this Issue Aug 25, 2010 · 1 comment

2 participants

@wavded
wavded commented Aug 25, 2010

getting this stack trace when using crypto (v5) from npm. any ideas on what could be wrong?

crypto:3638
return new Hash(hash);
     ^
TypeError: undefined is not a function
at CALL_NON_FUNCTION_AS_CONSTRUCTOR (native)
at Object.createHash (crypto:3638:10)
at md5 (/home/user_scripts/postgres-js/lib/postgres-pure.js:471:17)
at EventEmitter.<anonymous> (/home/user_scripts/postgres-js/lib/postgres-pure.js:324:30)
at EventEmitter.emit (events:26:26)
at checkInput (/home/user_scripts/postgres-js/lib/postgres-pure.js:297:19)
at Stream.<anonymous> (/home/user_scripts/postgres-js/lib/postgres-pure.js:311:5)
at Stream.emit (events:26:26)
at IOWatcher.callback (net:489:16)
at node.js:764:9
@janvanlysebeth

Your nodejs doesn't support crypto http://github.com/ry/node/issues/issue/187
To fix it recompile node after installing libssl-dev (and pkg-config if you're running on ubuntu).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.