Web3.js: Unable to install web3 on windows10

Created on 8 Aug 2017  ยท  23Comments  ยท  Source: ChainSafe/web3.js

C:>npm install -g web3

[email protected] postinstall C:UsersDavidAppDataRoamingnpmnode_modulesweb3
lerna bootstrap
lerna info version 2.0.0
lerna info Bootstrapping 19 packages
lerna info lifecycle preinstall
lerna info Installing external dependencies
lerna ERR! execute Error: Command failed: npm install
lerna ERR! execute npm ERR! Can't install C:UsersDavidAppDataRoamingnpmnode_modulesweb3packagesweb3-bzz: Missing package name
lerna ERR! execute
lerna ERR! execute npm ERR! A complete log of this run can be found in:
lerna ERR! execute npm ERR! C:UsersDavidAppDataRoamingnpm-cache_logs2017-08-08T17_14_48_191Z-debug.log
lerna ERR! execute
lerna ERR! execute at Promise.all.then.arr (C:UsersDavidAppDataRoamingnpmnode_modulesweb3node_modulesexecaindex.js:210:11)
lerna ERR! execute at
lerna ERR! execute at process._tickCallback (internal/process/next_tick.js:169:7)
lerna ERR! execute callback with error
lerna ERR! execute { Error: Command failed: npm install
lerna ERR! execute npm ERR! Can't install C:UsersDavidAppDataRoamingnpmnode_modulesweb3packagesweb3-bzz: Missing package name
lerna ERR! execute
lerna ERR! execute npm ERR! A complete log of this run can be found in:
lerna ERR! execute npm ERR! C:UsersDavidAppDataRoamingnpm-cache_logs2017-08-08T17_14_48_191Z-debug.log
lerna ERR! execute
lerna ERR! execute at Promise.all.then.arr (C:UsersDavidAppDataRoamingnpmnode_modulesweb3node_modulesexecaindex.js:210:11)
lerna ERR! execute at
lerna ERR! execute at process._tickCallback (internal/process/next_tick.js:169:7)
lerna ERR! execute stack: 'Error: Command failed: npm installnnpm ERR! Can't install C:\Users\David\AppData\Roaming\npm\node_modules\web3\packages\web3-bzz: Missing package namennnpm ERR! A complete log of this run can be found in:nnpm ERR! C:\Users\David\AppData\Roaming\npm-cache\_logs\2017-08-08T17_14_48_191Z-debug.lognn at Promise.all.then.arr (C:\Users\David\AppData\Roaming\npm\node_modules\web3\node_modules\execa\index.js:210:11)n at n at process._tickCallback (internal/process/next_tick.js:169:7)',
lerna ERR! execute code: 1,
lerna ERR! execute killed: false,
lerna ERR! execute stdout: '',
lerna ERR! execute stderr: 'npm ERR! Can't install C:\Users\David\AppData\Roaming\npm\node_modules\web3\packages\web3-bzz: Missing package namennnpm ERR! A complete log of this run can be found in:nnpm ERR! C:\Users\David\AppData\Roaming\npm-cache\_logs\2017-08-08T17_14_48_191Z-debug.logn',
lerna ERR! execute failed: true,
lerna ERR! execute signal: null,
lerna ERR! execute cmd: 'npm install',
lerna ERR! execute timedOut: false }
lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.
(node:4216) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: Command failed: npm install
npm ERR! Can't install C:UsersDavidAppDataRoamingnpmnode_modulesweb3packagesweb3-bzz: Missing package name
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersDavidAppDataRoamingnpm-cache_logs2017-08-08T17_14_48_191Z-debug.log
(node:4216) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:4216) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): Error: Command failed: npm install
npm ERR! Can't install C:UsersDavidAppDataRoamingnpmnode_modulesweb3packagesweb3-eth-abi: Missing package name
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersDavidAppDataRoamingnpm-cache_logs2017-08-08T17_14_48_207Z-debug.log
(node:4216) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 9): Error: Command failed: npm install
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ npm update check failed โ”‚
โ”‚ Try running with sudo or get access โ”‚
โ”‚ to the local update config store via โ”‚
โ”‚ sudo chown -R $USER:$(id -gn $USER) C:UsersDavid.config โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
npm ERR! Can't install C:UsersDavidAppDataRoamingnpmnode_modulesweb3packagesweb3-utils: Missing package name
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersDavidAppDataRoamingnpm-cache_logs2017-08-08T17_14_48_989Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: lerna bootstrap
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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:UsersDavidAppDataRoamingnpm-cache_logs2017-08-08T17_14_56_209Z-debug.log

Tried installing a more stable version 0.20.0 but it doesn't work either:

C:>npm install -g web3@^0.20.0
npm ERR! Error while executing:
npm ERR! C:Program FilesGitcmdgit.EXE ls-remote -h -t https://github.com/frozeman/bignumber.js-nolookahead.git
npm ERR!
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersDavidAppDataRoamingnpm-cache_logs2017-08-08T17_21_32_909Z-debug.log

Most helpful comment

$npm install web3@^0.20.0 worked for me. Issue solved on #950

All 23 comments

Same problem

Have anyone found a fix for this? Does this have to do something with having to install windows 10 SDK?

$npm install web3@^0.20.0 worked for me. Issue solved on #950

I had this same problem installing the beta on linux. Using web3@^0.20.0 worked for me too.

I had this same problem installing the [email protected] on win10. Using web3@^0.20.0 worked for me too.

@yuandi0823 It also worked for me.

As 1.0 is the next version and has major improvements it would be good to find the issue on windows. Can you guys please retry the latest version?

I have the same issue

I have same issue . I have tried with version [email protected] and web3@^0.20.0 . In both case i am facing same issue. Please suggest.

I had same issue on Windows 10, attempted install for a React app. I looked at the debug logs, looks like a dependency ([email protected]) doesn't support Windows OS platform. It tried skipping it, then got an error at [email protected] install: node-gyp rebuild.

Running npm install --save web3@^0.20.0 worked.

2017-11-03T17_49_21_086Z-debug.log

Same issue as @valkn0t on Windows10 but works with web3@^0.20.0

I am running Windows 10, Node 9.3, NPM 5.6 and I got the latest web3 working by following these steps:

  1. uninstall / reinstall node (deleted all related folders in local directories too, including in Roaming)
  2. in POWERSHELL as Administrator: npm install --global --production windows-build-tools
  3. npm install --save --no-optional web3

I had same issue, web3 was giving me error while installing. Its has been solved after using
npm install --global --production windows-build-tools in windows 10 run power shell has admin.
npm install --save web3@^0.20.0

240 error argv "/usr/bin/node" "/bin/npm" "install" "--save" "web3@^0.20.0"
241 error node v6.9.4
242 error npm v3.10.10
243 error code 128
244 error Command failed: git clone --template=/root/.npm/_git-remotes/_templates --mirror https://github.com/frozeman/bignumber.js-nolookahead.git /root/.npm/_git-remotes/git-https-github-com-frozeman-bignumber-js-nolookahead-git-18eea52a
244 error Cloning into bare repository '/root/.npm/_git-remotes/git-https-github-com-frozeman-bignumber-js-nolookahead-git-18eea52a'...
244 error fatal: Authentication failed for 'https://github.com/frozeman/bignumber.js-nolookahead.git/'

what the fuck is "Authentication failed"
for 'https://github.com/frozeman/bignumber.js-nolookahead.git/'" ??

Its still a issue
npm install -g [email protected] failed

npm install web3@^0.20.0 worked for me

npm install web3@^0.20.0 worked for me

try thi one
npm install --save [email protected]

Now it fails for [email protected].

The problem with web3@^0.20.0 and probably with other versions earlier than web3@^1.0.0-beta.36 is that modules like web3.utils necessary for getting balances, building transactions etc. don't seem to work or perhaps even exist, so installing the 0.20.0 version doesn't really solve the problem. I am not 100% sure, but it seems that running npm install --global --production windows-build-tools from Windows PowerShell (as an ADMIN!) and then installing web3@^1.0.0-beta.36 is the only way.

@igoreskin:
These modules exist alright, just not under web3.utils.
I've been using web3 v0.18.4 with Truffle, and web3 v1.0.0-beta.34 when working outside of the Truffle framework, and both are fine (even though the API is different in many places).

Hi,
I have installed Node.js first and then opened Node.js command prompt and entered different command to install web3. But not able to install it. Can someone please help me to understand the problem? your response will be highly appreciated. thank you.
Commands used:

npm install web3 AND npm install --save web3@^0.20.0

Node.js version installed: 10.15.3 (Recommanded for most users)

Error Message:

C:>npm install --save web3@^0.20.0
npm ERR! code ENOGIT
npm ERR! Error while executing:
npm ERR! undefined ls-remote -h -t https://github.com/frozeman/bignumber.js-nolookahead.git
npm ERR!
npm ERR! undefined
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersUS9959AppDataRoamingnpm-cache_logs2019-03-28T00_35_11_423Z-debug.log

Its still an issue when we use simple npm install web3 on windows 10.
For me, it is solved by using

npm install [email protected]

But [email protected] does not have some modules.

Was this page helpful?
0 / 5 - 0 ratings