Nodejs crypto not working #540

Bigmacbook opened this Issue Mar 13, 2013 · 4 comments


None yet

4 participants


I start off with this

var crypto = require('crypto');

var md5 = crypto.createHash('md5');

and I get this Uncaught TypeError: Object #Crypto has no method 'createHash'

I have no idea what is going on. This should work!


It seems there is no problem in my computer.

my file tree:

|-- ...
|-- node_modules/
    |-- crypto/

it's ok.

Solved my problem. webkit was already using the var crypto so i had to rename it to crypt

Working example:

var crypt = require('crypto');

var md5 = crypt.createHash('md5');
@Bigmacbook Bigmacbook closed this Mar 13, 2013
Mithgol commented May 14, 2013

After #713 it seems to become a kind of frequently asked question.

I've just added a note in wiki for future references.


@Mithgol thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment