Skip to content
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

Install web3 on windows7 #1974

Closed
gokuflashdev opened this issue Sep 27, 2018 · 7 comments
Closed

Install web3 on windows7 #1974

gokuflashdev opened this issue Sep 27, 2018 · 7 comments

Comments

@gokuflashdev
Copy link

I have a big problem with installation of web 3 in windows 7.
node 8.12.0
npm 6.4.1
node-gyp 3.8.0

I read in some other issue something like this:

I've solved this using the following steps

>npm install --global --production windows-build-tools
node-gyp configure --msvs_version=2015
npm config set python /path/to/executable/python2.7
npm install web3 --save

I cant node-gyp configure --msvs_version=2015 i get an error:

PS G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp\lib> node-gyp configure --msvs_version=2015
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@8.12.0 | win32 | x64
gyp info spawn G:\Users\goku.windows-build-tools\python27\python.EXE
gyp info spawn args [ 'G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=2015',
gyp info spawn args '-I',
gyp info spawn args 'G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp\lib\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'G:\Users\goku\.node-gyp\8.12.0\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=G:\Users\goku\.node-gyp\8.12.0',
gyp info spawn args '-Dnode_gyp_dir=G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=G:\Users\goku\.node-gyp\8.12.0\<(target_arch)\node.lib',
gyp info spawn args '-Dmodule_root_dir=G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp\lib',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp\lib\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp\lib) while trying to load bindi
ng.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:34
5:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "G:\Program Files\nodejs\node.exe" "G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp\
bin\node-gyp.js" "configure" "--msvs_version=2015"
gyp ERR! cwd G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp\lib
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

I have ms build tools 2017 and 2015
also python 2.7.15

@therightstuff
Copy link

windows-build-tools is probably not sufficient, you might need to install visual studio 2017 (community edition).
i needed python version 2.7.3 , you may want to try that too

@gokuflashdev
Copy link
Author

gokuflashdev commented Sep 28, 2018

I had installed vs community 2017 v15.8.5 with Programming classic app in C++ (windows 10 SDK, Visual C++ Tools for CMake, ATL library for C++ etc).
But I had not added it in PATH so I add IDE folder: "G:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE" I add it but still have the same problem:/

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

PS G:\Windows\system32> node-gyp configure --msvs_version=2015
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@8.12.0 | win32 | x64
gyp info spawn G:\Users\goku.windows-build-tools\python27\python.EXE
gyp info spawn args [ 'G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=2015',
gyp info spawn args '-I',
gyp info spawn args 'G:\Windows\system32\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'G:\Users\goku\.node-gyp\8.12.0\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=G:\Users\goku\.node-gyp\8.12.0',
gyp info spawn args '-Dnode_gyp_dir=G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=G:\Users\goku\.node-gyp\8.12.0\<(target_arch)\node.lib',
gyp info spawn args '-Dmodule_root_dir=G:\Windows\system32',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'G:\Windows\system32\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: G:\Windows\system32) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:34
5:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "G:\Program Files\nodejs\node.exe" "G:\Users\goku\AppData\Roaming\npm\node_modules\node-gyp\
bin\node-gyp.js" "configure" "--msvs_version=2015"
gyp ERR! cwd G:\Windows\system32
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
PS G:\Windows\system32> set-location "D:\testVSBuildTools"

And when I try to install web3 I get:

PS D:\testVSBuildTools> npm install web3 --save
npm WARN deprecated fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated tar.gz@1.0.7: ?? WARNING ?? tar.gz module has been deprecated and your application is vulnerable. P
lease use tar module instead: https://npmjs.com/tar

scrypt@6.0.3 preinstall D:\testVSBuildTools\node_modules\scrypt
node node-scrypt-preinstall.js

scrypt@6.0.3 install D:\testVSBuildTools\node_modules\scrypt
node-gyp rebuild

D:\testVSBuildTools\node_modules\scrypt>if not defined npm_config_node_gyp (node "G:\Program Files\nodejs\node_modules\n
pm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "G:\Progr
am Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Warning: Missing input files:
D:\testVSBuildTools\node_modules\scrypt\build..\scrypt\win\include\config.h
Projekty w tym rozwiązaniu są tworzone po kolei. Aby umożliwić tworzenie równoległe, dodaj przełącznik "/m".
Copying scrypt/win/include/config.h to scrypt/scrypt-1.2.0/config.h
Nie można odnaleźć określonego pliku.
G:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(423
,5): error MSB6006: Polecenie "CL.exe" zakończone przez kod -1073741515. [D:\testVSBuildTools\node_modules\scrypt\build
\copied_files.vcxproj]

G:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(423
,5): error MSB6006: Polecenie "CL.exe" zakończone przez kod -1073741515. [D:\testVSBuildTools\node_modules\scrypt\build
\scrypt_wrapper.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: G:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (G:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:2
62:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "G:\Program Files\nodejs\node.exe" "G:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\testVSBuildTools\node_modules\scrypt
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'D:\testVSBuildTools\package.json'
npm WARN testVSBuildTools No description
npm WARN testVSBuildTools No repository field.
npm WARN testVSBuildTools No README data
npm WARN testVSBuildTools No license 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! G:\Users\goku\AppData\Roaming\npm-cache_logs\2018-09-28T10_24_46_205Z-debug.log
PS D:\testVSBuildTools>

@therightstuff
Copy link

progress! :P

you're just going to have to figure out why the build error is happening...

@gokuflashdev
Copy link
Author

gokuflashdev commented Oct 2, 2018

I try to do the same steps like in this issue (nodejs/node-gyp#802). But there i have to install VS community 2017 cos there is no more VS Build Tools 2015 Technical Preview available. IDK that it`s work in community 2017 but I let u know.

The wird thing is to install some web3 dll I have to install whole VS community (7.16GB)...

After reinstall VS community i get other error code after this steps:

G:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
vcvarsall.bat
[ERROR:vcvarsall.bat] Error in script usage. The correct usage is:
Syntax:
vcvarsall.bat [arch] [platform_type] [winsdk_version] [-vcvars_ver=vc_versio
n]
where :
[arch]: x86 | amd64 | x86_amd64 | x86_arm | x86_arm64 | amd64_x86 | amd64_ar
m | amd64_arm64
[platform_type]: {empty} | store | uwp
[winsdk_version] : full Windows 10 SDK number (e.g. 10.0.10240.0) or "8.1" t
o use the Windows 8.1 SDK.
[vc_version] : {none} for default VS 2017 VC++ compiler toolset |
"14.0" for VC++ 2015 Compiler Toolset |
"14.1x" for the latest 14.1x.yyyyy toolset installed (e.g. "1
4.11") |
"14.1x.yyyyy" for a specific full version number (e.g. 14.11.

The store parameter sets environment variables to support Universal Windows Plat
form application
development and is an alias for 'uwp'.

For example:
vcvarsall.bat x86_amd64
vcvarsall.bat x86_amd64 10.0.10240.0
vcvarsall.bat x86_arm uwp 10.0.10240.0
vcvarsall.bat x86_arm onecore 10.0.10240.0 -vcvars_ver=14.0
vcvarsall.bat x64 8.1
vcvarsall.bat x64 store 8.1

Please make sure either Visual Studio or C++ Build SKU is installed.

G:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
vcvarsall.bat x64 10.0.17134.0


** Visual Studio 2017 Developer Command Prompt v15.8.5
** Copyright (c) 2017 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x64'

G:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
d:

D:>npm install web3 --save

scrypt@6.0.3 preinstall D:\node_modules\scrypt
node node-scrypt-preinstall.js

scrypt@6.0.3 install D:\node_modules\scrypt
node-gyp rebuild

D:\node_modules\scrypt>if not defined npm_config_node_gyp (node "G:\Program File
s\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_mo
dules\node-gyp\bin\node-gyp.js" rebuild ) else (node "G:\Program Files\nodejs\n
ode_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Warning: Missing input files:
D:\node_modules\scrypt\build..\scrypt\win\include\config.h
Projekty w tym rozwiązaniu są tworzone po kolei. Aby umożliwić tworzenie równole
głe, dodaj przełącznik "/m".
Copying scrypt/win/include/config.h to scrypt/scrypt-1.2.0/config.h
Nie można odnaleźć określonego pliku.
G:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VC
Targets\Microsoft.CppCommon.targets(423,5): error MSB6006: Polecenie "CL.exe" z
akończone przez kod -1073741701. [D:\node_modules\scrypt\build\copied_files.vcx
proj]

G:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VC
Targets\Microsoft.CppCommon.targets(423,5): error MSB6006: Polecenie "CL.exe" z
akończone przez kod -1073741701. [D:\node_modules\scrypt\build\scrypt_wrapper.v
cxproj]
gyp ERR! build error
gyp ERR! stack Error: msbuild failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (G:\Program Files\nodejs\node_modules
npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:198:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "G:\Program Files\nodejs\node.exe" "G:\Program Files\nodej
s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\node_modules\scrypt
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'D:\package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license 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 log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! G:\Users\goku\AppData\Roaming\npm-cache_logs\2018-10-02T11_52_50_6
81Z-debug.log

@munrocket
Copy link

@therightstuff why are you torturing windows users? cmake-js is much better.

@therightstuff
Copy link

@munrocket i'm just trying to be helpful with what i've learned about gyp, i've never heard of cmake-js before. if someone will switch to something better i'm all for it

@munrocket
Copy link

@therightstuff thanks. I was thinking that you maintainer.

@nivida nivida closed this as completed Oct 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants