New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Installing scrypt in windows 10 #176

Open
sivahanuman opened this Issue Jun 19, 2018 · 12 comments

Comments

Projects
None yet
6 participants
@sivahanuman

sivahanuman commented Jun 19, 2018

Hi,

I can't install scrypt in windows 10 , I am getting following error.

`$ 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:\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
`

@regattatropicals

This comment has been minimized.

regattatropicals commented Jun 19, 2018

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

@sivahanuman

This comment has been minimized.

sivahanuman commented Jun 19, 2018

I have tried the command before post here , doesn't work

@ml1nk

This comment has been minimized.

ml1nk commented Jun 19, 2018

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
nodejs/node-gyp#671

@sivahanuman

This comment has been minimized.

sivahanuman commented Jun 19, 2018

I have tried directly install build tools before post here , doesn't work

@sivahanuman

This comment has been minimized.

sivahanuman commented Jun 20, 2018

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 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 "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.
gyp ERR! build error
gyp ERR! stack Error: 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

`

@ml1nk

This comment has been minimized.

ml1nk commented Jun 21, 2018

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

@sivahanuman

This comment has been minimized.

sivahanuman commented Jun 21, 2018

Nope doesn't help

@sivahanuman

This comment has been minimized.

sivahanuman commented Jun 21, 2018

finally successfully installed

workaround

  1. reinstall vc++ build tools for vs2015

  2. 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

@chrisveness

This comment has been minimized.

chrisveness commented Jul 3, 2018

@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

@jaipraveen51

This comment has been minimized.

jaipraveen51 commented Jul 29, 2018

@chrisveness

I tried to install scrypt-kdf but below error

image

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.

@0xAshish

This comment has been minimized.

0xAshish commented Aug 6, 2018

@sivahanuman what's node -v

@chrisveness

This comment has been minimized.

chrisveness commented Aug 6, 2018

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment