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

npm install web3 error on ubuntu 16.04

Open keepchen opened this issue 9 years ago • 17 comments

npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm ERR! code 1 npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b browserifyCompatible git://github.com/frozeman/WebSocket-Node.git /home/ubuntu/.npm/_cacache/tmp/git-clone-49c1c456 npm ERR! /home/ubuntu/.npm/_cacache/tmp/git-clone-49c1c456/.git: Permission denied npm ERR!

npm ERR! A complete log of this run can be found in: npm ERR! /home/ubuntu/.npm/_logs/2017-09-28T10_56_30_865Z-debug.log ubuntu@ip-*:/var/www/ethereum_demo$ vi /home/ubuntu/.npm/_logs/2017-09-28T10_56_30_865Z-debug.log

800 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "web3" 801 verbose node v8.6.0 802 verbose npm v5.3.0 803 error code 1 804 error Command failed: /usr/bin/git clone --depth=1 -q -b browserifyCompatible git://github.com/frozeman/WebSocket-Node.git /home/ubuntu/.npm/_cacache/tmp/git-clone-49c1c456 804 error /home/ubuntu/.npm/_cacache/tmp/git-clone-49c1c456/.git: Permission denied

keepchen avatar Sep 28 '17 10:09 keepchen

Trying to set this up as well, but getting the same error. I tried running it manually sticking a nice lil "sudo" infront of it, but the installing won't progress past this problem.

slemsvamp avatar Oct 13 '17 21:10 slemsvamp

same here...

JonasDev17 avatar Oct 17 '17 19:10 JonasDev17

same problem here as well

simo-blckhrt avatar Nov 07 '17 14:11 simo-blckhrt

I'm not 100% sure this is the solution, or a possible solution but maybe someone could test this out since it did work for me. Try running:

npm cache clear

..to make sure that npm does stuff correctly. I might have changed something else that I can't recall that made the difference, but maybe it was the cache clear that saved me.

slemsvamp avatar Nov 08 '17 23:11 slemsvamp

I have the same issue. Just npm cache clear did not work for me unfortunately. It would be great if you could recall what else you did. Could you maybe check you console history to find out?

msbachler avatar Nov 13 '17 13:11 msbachler

OK. I gave up with npm install pulling it and I downloaded the zip of the release from GitHub. Put it in my node_modules folder and ran npm install on it. That seems to allow it to finish the install process. It seems to be working fine.

msbachler avatar Nov 13 '17 13:11 msbachler

Sorry, I don't have the logs left and I honestly think it was just the npm cache clear in my case, but glad you got it working!

slemsvamp avatar Dec 20 '17 13:12 slemsvamp

same problem.

XatMassacrE avatar Dec 27 '17 07:12 XatMassacrE

same issue on mac os sierra, npm v5. Anyone found a real cause of the problem?

vic08 avatar Jan 01 '18 08:01 vic08

alrite, this is probably happening because npm creates cache folders with ownership/permissions somehow not writable for git, so git dependency can not be written to cache folder. Too lazy to confirm what is exactly going on there.

Quick solution is: switch to npm version 4 instead of 5.

It appears like v5 release of npm is not usable, this is not the first time I can't load dependencies that worked with previous npm versions.

vic08 avatar Jan 01 '18 09:01 vic08

similar problem, Mac OS High Sierra, attempting to npm install -g web3

apparent quick work-around:

npm install web3

(do not use -g parameter, do not sudo, install for active user only not as global npm package)

JasonCoombs avatar Feb 23 '18 04:02 JasonCoombs

I have exactly the same issue, tried cleaning the cache and installing the depencies on their own, to no avail.

KorbinianK avatar Mar 19 '18 19:03 KorbinianK

npm install [email protected]

kinganeng avatar May 17 '18 03:05 kinganeng

sudo npm install -g web3 --unsafe-perm=true --allow-root this worked for me in ubuntu 18.04.01

saikat909 avatar Aug 15 '18 20:08 saikat909

Manually execute git clone,and chang git:// to https://, and proceed with your npm install

ranjithapr avatar Sep 17 '18 05:09 ranjithapr

sudo npm install -g web3 --unsafe-perm=true --allow-root this work for me

sbansal96 avatar Dec 11 '18 05:12 sbansal96

Closed because of the ongoing clean up of the issue list. Feel free to ask this in our gitter channel or on stackoverflow.

nivida avatar Apr 16 '19 09:04 nivida