Error: NPM Cannot find module

I am having some difficulty getting a crypto package to work.

First I tried

Only to get a no method errror:

Then I tried using meteorhacks:npm to grab the crypto package which worked for me very well in pure NodeJS example, and hit the module not found error, and added to this issue:

What am I doing wrong here guys?

I am very close to just giving up and dropping the files into the project directly.

Thanks in Advance!

I see now that I did not need crypto package from Gozala and that its actually built into NodeJS.

So the solution was to not use meteorhacks:npm. Since this a global package part of NodeJS I simply did Npm.require(‘crypto’) and was able to move forward.

That also invalidates the complete existence of meteor-crypto-hmac package. There is just no need. Should probably be pruned off, no?


-Robert Baindourov