Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Crypto module not working on cygwin #187

Closed
fjakobs opened this issue Jun 22, 2010 · 6 comments
Closed

Crypto module not working on cygwin #187

fjakobs opened this issue Jun 22, 2010 · 6 comments

Comments

@fjakobs
Copy link

fjakobs commented Jun 22, 2010

Running this snippet in node 0.1.98 from cygwin

var crypto = require("crypto");
var hash = crypto.createHash("sha1");

I get the following error:

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 Object. (/cygdrive/c/development/javeline/ide/sha1.js:2:19)
   at Module._compile (module:384:23)
   at Module._loadScriptSync (module:393:8)
   at Module.loadSync (module:296:10)
   at Object.runMain (module:447:22)
   at node.js:208:10

@raff
Copy link

raff commented Jun 22, 2010

I have tested this and it works fine.

From the error I suspect you compiled node without SSL support. Make sure you have openssl or another valid library installed.

If this is the problem I suggest throwing a more meaningful exception if the crypto module is accessed and there is no ssl/crypto library installed.

@ajaxorg
Copy link

ajaxorg commented Jun 22, 2010

openssl is installed but I'm not 100% sure if node is compiled with it. I"ll check that.

@mrdoob
Copy link

mrdoob commented Jul 2, 2010

Make sure libssl-dev is installed before configure/make

@ry
Copy link

ry commented Feb 17, 2011

closing. working now.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants