web3.js icon indicating copy to clipboard operation
web3.js copied to clipboard

Unable to install web3 on windows10

Open skarred14 opened this issue 9 years ago • 24 comments

C:>npm install -g web3

[email protected] postinstall C:\Users\David\AppData\Roaming\npm\node_modules\web3 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:\Users\David\AppData\Roaming\npm\node_modules\web3\packages\web3-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:\Users\David\AppData\Roaming\npm-cache_logs\2017-08-08T17_14_48_191Z-debug.log lerna ERR! execute lerna ERR! execute at Promise.all.then.arr (C:\Users\David\AppData\Roaming\npm\node_modules\web3\node_modules\execa\index.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:\Users\David\AppData\Roaming\npm\node_modules\web3\packages\web3-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:\Users\David\AppData\Roaming\npm-cache_logs\2017-08-08T17_14_48_191Z-debug.log lerna ERR! execute lerna ERR! execute at Promise.all.then.arr (C:\Users\David\AppData\Roaming\npm\node_modules\web3\node_modules\execa\index.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 install\nnpm ERR! Can't install C:\Users\David\AppData\Roaming\npm\node_modules\web3\packages\web3-bzz: Missing package name\n\nnpm 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.log\n\n 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 name\n\nnpm 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.log\n', 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:\Users\David\AppData\Roaming\npm\node_modules\web3\packages\web3-bzz: Missing package name npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\David\AppData\Roaming\npm-cache_logs\2017-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:\Users\David\AppData\Roaming\npm\node_modules\web3\packages\web3-eth-abi: Missing package name npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\David\AppData\Roaming\npm-cache_logs\2017-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:\Users\David.config │ └────────────────────────────────────────────────────────────┘ npm ERR! Can't install C:\Users\David\AppData\Roaming\npm\node_modules\web3\packages\web3-utils: Missing package name npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\David\AppData\Roaming\npm-cache_logs\2017-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:\Users\David\AppData\Roaming\npm-cache_logs\2017-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 Files\Git\cmd\git.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:\Users\David\AppData\Roaming\npm-cache_logs\2017-08-08T17_21_32_909Z-debug.log

skarred14 avatar Aug 08 '17 19:08 skarred14

Same problem

stephanelebrun avatar Aug 09 '17 11:08 stephanelebrun

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

psnmissaka avatar Aug 11 '17 05:08 psnmissaka

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

stephanelebrun avatar Aug 11 '17 06:08 stephanelebrun

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

0xcaff avatar Aug 16 '17 00:08 0xcaff

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

yuandi0823 avatar Aug 25 '17 17:08 yuandi0823

@yuandi0823 It also worked for me.

ProphetDaniel avatar Aug 27 '17 02:08 ProphetDaniel

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?

frozeman avatar Oct 20 '17 10:10 frozeman

I have the same issue

phatdoyle avatar Oct 28 '17 17:10 phatdoyle

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.

barnendu avatar Nov 01 '17 07:11 barnendu

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

tshallenberger avatar Nov 03 '17 18:11 tshallenberger

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

ptxd avatar Nov 09 '17 04:11 ptxd

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

mrgrotts avatar Jan 10 '18 08:01 mrgrotts

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

Nagaraj007 avatar Jan 27 '18 06:01 Nagaraj007

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/'

yutaowang avatar Feb 27 '18 19:02 yutaowang

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

yutaowang avatar Feb 27 '18 19:02 yutaowang

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

npm install web3@^0.20.0 worked for me

confused1108 avatar May 16 '18 19:05 confused1108

npm install web3@^0.20.0 worked for me

couranos avatar Jun 23 '18 11:06 couranos

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

Farhan-riasat avatar Aug 11 '18 08:08 Farhan-riasat

Now it fails for [email protected].

barakman avatar Aug 29 '18 10:08 barakman

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 avatar Nov 04 '18 03:11 igoreskin