barrysteyn / node-scrypt

Scrypt for Node
370 stars 88 forks source link

Can not find module scrypt from index.js #162

Open criticalbh opened 6 years ago

criticalbh commented 6 years ago

It looks like var scryptNative = require("./build/Release/scrypt") can not be found. If I replace this with var scryptNative = require("./build/Release/scrypt.node") it works.

Here is the error message:

    Cannot find module './build/Release/scrypt' from 'index.js'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
      at Object.<anonymous> (node_modules/mymodule/node_modules/scrypt/index.js:3:20)
fanatid commented 6 years ago

PR #144 https://github.com/TooTallNate/node-bindings/blob/58141c6ce00b2f7690d7115e6635fdd5739b7fd0/bindings.js#L65

amazingandyyy commented 6 years ago

can we fix this asap?

ethereumdegen commented 6 years ago

For right now, I am cloning a local copy of the scrypt repo and changing that line from the require("./build/Release/scrypt") to require("./build/Release/scrypt.node") and then adding 'node-loader' to webpack config and it works fine. However yes we will need an official fix for this :) Also some note that youll need node-loader

levino commented 6 years ago

I created a patch file for scrypt to be used with patch-package

or2008 commented 5 years ago

any updates on this?

Aniket-Engg commented 5 years ago

Is work on it in progress?

demurgos commented 5 years ago

There is a replacement (scrypt-kdf) based on Node's native scrypt support.