node-scrypt icon indicating copy to clipboard operation
node-scrypt copied to clipboard

Can not find module scrypt from index.js

Open criticalbh opened this issue 6 years ago • 7 comments

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)

criticalbh avatar Nov 23 '17 10:11 criticalbh

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

fanatid avatar Nov 24 '17 15:11 fanatid

can we fix this asap?

amazingandyyy avatar Dec 26 '17 09:12 amazingandyyy

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

ethereumdegen avatar Jul 24 '18 19:07 ethereumdegen

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

levino avatar Sep 07 '18 14:09 levino

any updates on this?

or2008 avatar Jan 17 '19 12:01 or2008

Is work on it in progress?

Aniket-Engg avatar Jun 26 '19 12:06 Aniket-Engg

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

demurgos avatar Jun 28 '19 13:06 demurgos