How do I install web3@1.0.-beta.26 on Windows 10? npm install --save web3@1.0.0-beta.26 does not work and creates a page of errors.

I've also tried --python=python2.7

Here is what I get.

C:\Users\user\inbox>npm install --save web3@1.0.0-beta.26 --python=python2.7
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. Please use tar module instead: https://npmjs.com/tar
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> scrypt@6.0.3 preinstall C:\Users\user\inbox\node_modules\scrypt
> node node-scrypt-preinstall.js

> scrypt@6.0.3 install C:\Users\user\inbox\node_modules\scrypt
> node-gyp rebuild

C:\Users\user\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 )
Traceback (most recent call last):
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module>
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main
    return gyp_main(args)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 514, in gyp_main
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 98, in Load
    generator.CalculateVariables(default_variables, params)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1916, in CalculateVariables
    generator_flags.get('msvs_version', 'auto'))
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 434, in SelectVisualStudioVersion
    versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: '2017'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:336: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 10.0.15063
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 C:\Users\user\inbox\node_modules\scrypt
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN inbox@1.0.0 No description
npm WARN inbox@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

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\user\AppData\Roaming\npm-cache\_logs\2018-01-17T22_41_28_270Z-debug.log
  • The problem appears to be you are using VS 2017, I'd suggest to try VS 2015 that version appears to work.
    – Ismael
    Jan 19 '18 at 3:53
  • Tried this and am still getting the errors. Jan 22 '18 at 2:03
  • From the error message about missing a file, it appears something have failed previously, perhaps a download didn't finis correctly. If you have the log file upload it to pastebin or similar and add a link here.
    – Ismael
    Jan 22 '18 at 13:11

Open a command prompt as Administrator.

Run npm install --global --production windows-build-tools

You are missing some of the build tools. Try installing the above package that will fetch the necessary tools and python version.

If the above still doesn't work, try starting fresh by deleting existing build tools


Open cmd:(Administrator mode)

RUN npm --add-python-to-path='true' --debug install --global --production windows-build-tools

Make sure npm pointing to the right Python version by running

npm config set python python\path\to\executable

The 'path' should point directly to the Python.exe

Note: When installing windows-build-tools with npm, python executable can be found


I think the above will resolve the issue and you can RUN npm install --save web3@1.0.0-beta.26


Try to update your Node version and then install web3. Had the same problem and also tried with other things (using VS2015 and installing windows-build-tools and setting up python), but the only thing that helped me was upgrading node to newer version.


Maybe late on replying, If you've already tried this:

npm install --global --production windows-build-tools

and still facing the same problem then take the pain and install visual studio 2017, with of course the C++ compiler included.

I was facing the same problem for the long time and did try almost everything internet had to offer like tried updating the nodejs and other dependencies of project like ganache-cli, mocha but that didn't help. I ended up installing the vs 2017 and worked like a charm afterwards.


npm install --global --production windows-build-tools --vs2015 worked for me. As was stated already you can also install Visual Studio 2015/2017 which I had recently uninstalled vs2017 and I started running into a similar issue once I created a new project with web3.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.