barrysteyn / node-scrypt

Scrypt for Node
370 stars 88 forks source link

error with scrypt package #135

Open coderwithattitude opened 8 years ago

coderwithattitude commented 8 years ago

Hello i am trying to install ethereumjs testrpc but i keep having issues with you package please help

C:\Users\user\AppData\Roaming\npm\node_modules\ethereumjs-testrpc\node_modules\s crypt>if not defined npm_config_node_gyp (node "C:\Users\user\AppData\Roaming\np m\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js " rebuild ) else (node "" rebuild ) Warning: Missing input files: C:\Users\user\AppData\Roaming\npm\node_modules\ethereumjs-testrpc\node_modules\s crypt\build..\scrypt\win\include\config.h Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. Copying scrypt/win/include/config.h to scrypt/scrypt-1.2.0/config.h The system cannot find the file specified. TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Users\user\AppData\Roaming\npm\node_modules\ethereumjs-tes trpc\node_modules\scrypt\build\copied_files.vcxproj]

TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Users\user\AppData\Roaming\npm\node_modules\ethereumjs-tes trpc\node_modules\scrypt\build\scrypt_wrapper.vcxproj]

gyp ERR! build error gyp ERR! stack Error: C:\Program Files\MSBuild\14.0\bin\msbuild.exe failed wit h exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\user\AppData\Roaming\npm\nod e_modules\npm\node_modules\node-gyp\lib\build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:215:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\user\AppData \Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "re build" gyp ERR! cwd C:\Users\user\AppData\Roaming\npm\node_modules\ethereumjs-testrpc\n ode_modules\scrypt gyp ERR! node -v v6.5.0 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok C:\Users\user\AppData\Roaming\npm `-- (empty)

npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\user\AppData\R oaming\npm\node_modules\npm\bin\npm-cli.js" "install" "-g" "ethereumjs-test rpc" npm ERR! node v6.5.0 npm ERR! npm v3.8.7 npm ERR! code ELIFECYCLE

npm ERR! scrypt@6.0.3 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the scrypt@6.0.3 install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the scrypt package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs scrypt npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls scrypt npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\Users\user\npm-debug.log npm ERR! code 1

360disrupt commented 8 years ago

Same for me: Cannot Install OSX Sierra, Node v.6.9, npm 3.10.8, node-gyp 3.4.0 https://github.com/ethereumjs/testrpc/issues/185

direct install

npm WARN ethereum-bet@1.0.0 No description
npm WARN ethereum-bet@1.0.0 No repository field.
npm ERR! Darwin 16.0.0
npm ERR! argv "/Users/MasterG/.nvm/versions/node/v6.9.0/bin/node" "/Users/MasterG/.nvm/versions/node/v6.9.0/bin/npm" "install" "node-scrypt"
npm ERR! node v6.9.0
npm ERR! npm  v3.10.8
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! node-scrypt@0.0.1 preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the node-scrypt@0.0.1 preinstall script 'node-waf clean || true; node-waf configure build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-scrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf clean || true; node-waf configure build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-scrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls node-scrypt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/MasterG/Projekte/ethereum-bet/npm-debug.log

When installing ethereumjs-testrpc

> scrypt@6.0.3 preinstall /Users/MasterG/.nvm/versions/node/v6.9.0/lib/node_modules/.staging/scrypt-d8c966a3
> node node-scrypt-preinstall.js

/Users/MasterG/.nvm/versions/node/v6.9.0/bin/testrpc -> /Users/MasterG/.nvm/versions/node/v6.9.0/lib/node_modules/ethereumjs-testrpc/bin/testrpc

> scrypt@6.0.3 install /Users/MasterG/.nvm/versions/node/v6.9.0/lib/node_modules/ethereumjs-testrpc/node_modules/scrypt
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack Error: spawn EACCES
gyp ERR! stack     at exports._errnoException (util.js:1026:11)
gyp ERR! stack     at ChildProcess.spawn (internal/child_process.js:313:11)
gyp ERR! stack     at exports.spawn (child_process.js:380:9)
gyp ERR! stack     at exports.execFile (child_process.js:143:15)
gyp ERR! stack     at checkPythonVersion (/Users/MasterG/.nvm/versions/node/v6.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:419:5)
gyp ERR! stack     at /Users/MasterG/.nvm/versions/node/v6.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:361:9
gyp ERR! stack     at /Users/MasterG/.nvm/versions/node/v6.9.0/lib/node_modules/npm/node_modules/which/which.js:88:20
gyp ERR! stack     at /Users/MasterG/.nvm/versions/node/v6.9.0/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack     at /Users/MasterG/.nvm/versions/node/v6.9.0/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Darwin 16.0.0
gyp ERR! command "/Users/MasterG/.nvm/versions/node/v6.9.0/bin/node" "/Users/MasterG/.nvm/versions/node/v6.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/MasterG/.nvm/versions/node/v6.9.0/lib/node_modules/ethereumjs-testrpc/node_modules/scrypt
gyp ERR! node -v v6.9.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
/Users/MasterG/.nvm/versions/node/v6.9.0/lib
└── (empty)

npm ERR! Darwin 16.0.0
npm ERR! argv "/Users/MasterG/.nvm/versions/node/v6.9.0/bin/node" "/Users/MasterG/.nvm/versions/node/v6.9.0/bin/npm" "install" "-g" "ethereumjs-testrpc"
npm ERR! node v6.9.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR! 
npm ERR! Failed at the scrypt@6.0.3 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the scrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs scrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls scrypt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/MasterG/Projekte/ethereum-bet/npm-debug.log
npm ERR! code 1
lordjancso commented 7 years ago

I have a similar error. I use Docker (node:4 image) and here is the npm install output: https://gist.github.com/lordjancso/c86ec3fba93c5b2aa35e3c07fc70ae13#file-log-txt-L7123

If you search for node-gyp you will see there is a WARN during installing scrypt (as scrypt-for-humans dependency).

This is the error message:

module.js:327
    throw err;
    ^

Error: Cannot find module './build/Release/scrypt'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/app/node_modules/scrypt-for-humans/node_modules/scrypt/index.js:3:20)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/app/node_modules/scrypt-for-humans/lib/scrypt-for-humans.js:3:10)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/app/node_modules/scrypt-for-humans/index.js:1:80)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)

But I've found a workaround. If I run these two commands right after npm install:

cd node_modules/scrypt-for-humans/node_modules/scrypt
node-gyp configure build
sunqihang commented 7 years ago

Same issue happens here

murich commented 7 years ago

Same here. Problem with installing scrypt

k06a commented 7 years ago

Same for me:

$ npm i

> scrypt@6.0.3 preinstall ****/node_modules/scrypt
> node node-scrypt-preinstall.js

Error: Error: Command failed: ./configure
/bin/sh: ./configure: Permission denied
sc0Vu commented 7 years ago

Maybe you can check this readme out.

Samuel-Pedraza commented 6 years ago

Hi all,

I solved this problem by typing in my command line: > npm install scrypt This updated the package, and allowed me to proceed with coding.

kristianmandrup commented 6 years ago

@Samuel-Pedraza I tried your solution

Same errors:

➜  backend git:(master) ✗ npm install scrypt

> scrypt@6.0.3 preinstall /Users/kristianmandrup/repos/yeay/crowdsale-website/backend/node_modules/scrypt
> node node-scrypt-preinstall.js

> scrypt@6.0.3 install /Users/kristianmandrup/repos/yeay/crowdsale-website/backend/node_modules/scrypt
> node-gyp rebuild

  SOLINK_MODULE(target) Release/copied_files.node
  CC(target) Release/obj.target/scrypt_wrapper/src/util/memlimit.o
  CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/keyderivation.o
  CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/pickparams.o
  CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/hash.o
  LIBTOOL-STATIC Release/scrypt_wrapper.a
  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/lib/crypto/crypto_scrypt.o
  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/lib/crypto/crypto_scrypt_smix.o
  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/libcperciva/util/warnp.o
  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/libcperciva/alg/sha256.o
  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/libcperciva/util/insecure_memzero.o
  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/lib/scryptenc/scryptenc_cpuperf.o
  LIBTOOL-STATIC Release/scrypt_lib.a
  CXX(target) Release/obj.target/scrypt/src/node-boilerplate/scrypt_common.o
In file included from ../src/node-boilerplate/scrypt_common.cc:28:
In file included from ../../nan/nan.h:192:
../../nan/nan_maybe_43_inl.h:112:15: error: no member named 'ForceSet' in 'v8::Object'
  return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
         ~~~  ^
In file included from ../src/node-boilerplate/scrypt_common.cc:28:
../../nan/nan.h:834:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
    return node::MakeCallback(
                 ^
/Users/kristianmandrup/.node-gyp/10.1.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/kristianmandrup/.node-gyp/10.1.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../src/node-boilerplate/scrypt_common.cc:28:
../../nan/nan.h:849:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
    return node::MakeCallback(
                 ^
/Users/kristianmandrup/.node-gyp/10.1.0/include/node/node.h:164:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/kristianmandrup/.node-gyp/10.1.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../src/node-boilerplate/scrypt_common.cc:28:
../../nan/nan.h:864:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
    return node::MakeCallback(
                 ^
/Users/kristianmandrup/.node-gyp/10.1.0/include/node/node.h:157:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/kristianmandrup/.node-gyp/10.1.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../src/node-boilerplate/scrypt_common.cc:28:
../../nan/nan.h:1473:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
    return scope.Escape(node::MakeCallback(
                              ^
/Users/kristianmandrup/.node-gyp/10.1.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/kristianmandrup/.node-gyp/10.1.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
4 warnings and 1 error generated.
make: *** [Release/obj.target/scrypt/src/node-boilerplate/scrypt_common.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/kristianmandrup/repos/yeay/crowdsale-website/backend/node_modules/scrypt
gyp ERR! node -v v10.1.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN crowdsale-backend@0.1.0 No repository field.
npm WARN crowdsale-backend@0.1.0 license should be a valid SPDX license expression

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the scrypt@6.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Anyone has a solution? or can it just be ignored??

dbryan0516 commented 6 years ago

The changes in #144 worked for me

rayeaster commented 6 years ago

sudo npm install -g web3 --unsafe-perm=true --allow-root

nftleader commented 6 years ago

This issue is solved after installing node-gyp on my machine. https://github.com/nodejs/node-gyp#installation

lakshmi442 commented 4 years ago

I am facing issue, while installing scrypt npm in node version 12.16.0 in windows 10