Open sivahanuman opened 6 years ago
On Windows 10, Scrypt is built using node-gyp, which can be acquired by globally installing Microsoft's Windows Build Tools, so install that first from an elevated PowerShell or CMD.exe (run as Administrator).
npm install --global --production windows-build-tools
It takes a while.
Then get node-gyp:
npm install -g node-gyp
Then you should be able to run
npm install scrypt
This info comes from node-gyp's github page.
-Robert
I have tried the command before post here , doesn't work
My last try with
npm install --global --production windows-build-tools
wasn't successful, too. I installed the build tools directly, then it worked.
Alternative this issue seems to address the same problem https://github.com/nodejs/node-gyp/issues/671
I have tried directly install build tools before post here , doesn't work
Hi, this is the error. machine configuration Windows 10 64 bit, Visual studio 2012 Visual Studio 2017 .net Frameworks 3.5 and 4.7,2 ( backward compatibility )
` $ npm install scrypt
scrypt@6.0.3 preinstall D:\solidity\inbox\node_modules\scrypt node node-scrypt-preinstall.js
scrypt@6.0.3 install D:\solidity\inbox\node_modules\scrypt node-gyp rebuild
D:\solidity\inbox\node_modules\scrypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Warning: Missing input files:
D:\solidity\inbox\node_modules\scrypt\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.
D:\solidity\inbox\node_modules\scrypt\build\copied_files.vcxproj(20,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v110\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:127:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\solidity\inbox\node_modules\scrypt
gyp ERR! node -v v9.7.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN webpack-cli@2.1.5 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN inbox@1.0.0 No description
npm WARN inbox@1.0.0 No repository field.
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.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\siva.subramanian\AppData\Roaming\npm-cache_logs\2018-06-20T06_10_33_432Z-debug.log
`
Something is probably wrong with your configuration, as error messages like
MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v110\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
leads to the issue in my previous post or pages like: https://www.codesd.com/item/why-does-msbuild-look-in-c-for-microsoft-cpp-default-props-instead-of-c-program-files-x86-msbuild-error-msb4019.html
Nope doesn't help
finally successfully installed
workaround
reinstall vc++ build tools for vs2015
Manually add the string value in Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\MSBuild\ToolsVersions\14.0
key = VCTargetsPath
value = C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140
@sivahanuman if you are using Node v10.5.0 (current), scrypt has finally been released as part of the crypto module: I have written a zero-dependency npm module scrypt-kdf which you might find interesting as it has none of the issues of native abstractions, and which I would be glad for you to try out.
It has a slightly simplified API compared with this module (it is promise-based and interfaces with strings rather than buffers), but it operates on the same stored password hashes.
If you try it, let me know your experiences! @chrisveness
@chrisveness
I tried to install scrypt-kdf but below error
My original intention was to npm install a github downloaded package related to ethereum/solidity
I encountered config.h missing input file error and I tried setting up windows-build-tools command and tried few other options, so far no luck.
Can you please advise? I have already posted a message at scrypt issue page yesterday.
@sivahanuman what's node -v
@jaipraveen51 I can't quite make sense of that screenshot, but it looks like errors coming from scrypt, rather than scrypt-kdf - try making sure scrypt is removed from package.json (with scrypt-kdf in its place), delete the node_modules directory, and run npm install
again.
This is crazy the node-gyp doesn't work at all. I tried all the ways. What all I tried:
node-gpy
it didn't worknode-gpy
it didn't worknode-gpy
it didn't worknode-gyp
- still node-gpy
it didn't worknode-gyp
and reinstall - still node-gpy
it didn't worknpm config set msvs_version 2013 --global
- still node-gpy
it didn't workVC++
doesnt work as wellscrypt@6.0.3 install:
node-gyp rebuild
Scrypt cannot be installed.
@sriharikapu, this repo is no longer maintained.
If you are using scrypt.hash
, it is now available natively in the Node.js crypto module.
If you are using scrypt.kdf
/ scrypt.verifyKdf
, scrypt-kdf is a close-to-direct replacement.
@chrisveness I will check and get back to you
I was using scrypt.hash
same story on my other windows :
@sriharikapu use crypto.scrypt() in Node 10.5.0+, or scrypt-async for Node < 10.5.0.
I am currently using scrypt-async its not working with any node version for me on my windows.
Hi. I had the same problem. What I did was create the entire project by running the cmd command as administrator:
Downgrading Node.js (npm) works for me.
Windows 10 64 bit Downgrade Node.js 12.13.0 to Node.js 10.17.0 works.
Windows 10 64 bit Downgrade Node.js 12.13.0 to Node.js 10.17.0 works.
Indeed this made my environment to pass the point of installing scrypt, which was somehow required for ethereum-alarm-clock
Hi,
I can't install scrypt in windows 10 , I am getting following error.
`$ npm install scrypt
D:\solidity\inbox\node_modules\scrypt>if not defined npm_config_node_gyp (node "C:\Users\siva.subramanian\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\siva.subramanian\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) Warning: Missing input files: D:\solidity\inbox\node_modules\scrypt\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. D:\solidity\inbox\node_modules\scrypt\build\copied_files.vcxproj(20,3): error MSB4019: The imported project "D:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
D:\solidity\inbox\node_modules\scrypt\build\scrypt_wrapper.vcxproj(20,3): error MSB4019: The imported project "D:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error:
C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\siva.subramanian\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at ChildProcess.emit (events.js:127:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12) gyp ERR! System Windows_NT 10.0.16299 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\siva.subramanian\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd D:\solidity\inbox\node_modules\scrypt gyp ERR! node -v v9.7.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm WARN webpack-cli@2.1.5 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN inbox@1.0.0 No description npm WARN inbox@1.0.0 No repository field.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.npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\siva.subramanian\AppData\Roaming\npm-cache_logs\2018-06-19T02_05_43_201Z-debug.log `