Error: NPM Cannot find module


#1

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

First I tried
https://atmospherejs.com/jparker/crypto-hmac

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!


#2

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?

Thanks

-Robert Baindourov