When I try to install the web3 package, it always fails !
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/frozeman/WebSocket-Node.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.253.113]: errno=No such file or directory
npm ERR! github.com[1: 192.30.253.112]: errno=No such file or directory
npm ERR!
npm ERR!
npm ERR! exited with error code: 128 #
Same here! I am using macOS Mojave beta 2 version. This is my error message:
npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated [email protected]: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
> [email protected] preinstall /usr/local/lib/node_modules/web3/node_modules/scrypt
> node node-scrypt-preinstall.js
Error: Error: Command failed: ./configure
./configure: line 1904: config.log: Permission denied
./configure: line 1914: config.log: Permission denied
> [email protected] install /usr/local/lib/node_modules/web3/node_modules/scrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/web3/node_modules/scrypt/build'
gyp ERR! System Darwin 18.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/web3/node_modules/scrypt
gyp ERR! node -v v9.7.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /Users/mirajshah/.npm/_logs/2018-07-14T17_11_11_366Z-debug.log
Microsoft Windows [版本 6.3.9600]
(c) 2013 Microsoft Corporation。保留所有权利。
C:\Users\dongpeng>npm install web3
npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Suppor
t
npm WARN deprecated tar.[email protected]: ⚠️ WARNING ⚠️ tar.gz module has been deprecat
ed and your application is vulnerable. Please use tar module instead: https://np
mjs.com/tar
[email protected] preinstall C:\Users\dongpeng\node_modules\scrypt
node node-scrypt-preinstall.js
[email protected] install C:\Users\dongpeng\node_modules\scrypt
node-gyp rebuild
C:\Users\dongpeng\node_modules\scrypt>if not defined npm_config_node_gyp (node "
C:\ruanjian\webstorm\node.js\node_modules\npm\node_modules\npm-lifecycle\node-gy
p-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\ru
anjian\webstorm\node.js\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js"
rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\ruanjian\webstorm\node.js\no
de_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.
e_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\ruanjian\webstorm\node.js\node_modules\npm\node_modules
\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:170:21)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\ruanjian\webstorm\node.js\node.exe" "C:\ruanjian\webs
torm\node.js\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "reb
uild"
gyp ERR! cwd C:\Users\dongpeng\node_modules\scrypt
gyp ERR! node -v v9.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\dongpeng\packa
ge.json'
npm WARN dongpeng No description
npm WARN dongpeng No repository field.
npm WARN dongpeng No README data
npm WARN dongpeng No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! C:\Users\dongpeng\AppData\Roaming\npm-cache_logs\2018-07-15T12_52_
04_495Z-debug.log
C:\Users\dongpeng>
I tried to install this version: [email protected] and got the same issue on Windows10:
1031 warn [email protected] No description
1032 warn [email protected] No repository field.
1033 verbose stack Error: [email protected] install: node-gyp rebuild
.......
1038 verbose node v8.9.3
1039 verbose npm v5.5.1
1040 error code ELIFECYCLE
1041 error errno 1
1042 error [email protected] install: node-gyp rebuild
1042 error Exit status 1
1043 error Failed at the [email protected] install script.
1043 error This is probably not a problem with npm. There is likely additional logging output above.
1044 verbose exit [ 1, true ]
Same here on Windows 10. One week ago there were no problems.
[email protected] preinstall c:\b\d\node_modules\scrypt
node node-scrypt-preinstall.js
[email protected] install c:\b\d\node_modules\scrypt
node-gyp rebuild
c:\b\d\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 )
module.js:549
throw err;
^
gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error:gypfailed 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.14393
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:\b\d\node_modules\scrypt
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install:node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
Sorry guys I can't reproduce this error. I've created a new folder and a package.json with npm initafter that I installed web3 with npm install web3 and it works as expected. Have you tried todo this in a clean folder like i have?
Versions:
OS: macOS High Sierra 10.13.6
NPM: 6.1.0
Node: 10.0.5
@nivida For me, it is blocked at
fetchMetadata: sill resolveWithNewModule [email protected] checking installable status
and then, this error appears :
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/frozeman/WebSocket-Node.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.253.113]: errno=No such file or directory
npm ERR! github.com[1: 192.30.253.112]: errno=No such file or directory
npm ERR!
npm ERR!
npm ERR! exited with error code: 128
I will contact my IT team to see it can be resolve with them but one of my friend tried to install it, and he had an error too.
@CorentinPacaud I think the problem you have is the firewall in your office. Have you tried to set the git global config to https instead of ssh?
@dp12321 i think you should set python in the cli PATH as you can see here: https://github.com/felixrieseberg/windows-build-tools/issues/56
It also looks like you don't have a package.json in the directory: C:\Users\dongpeng\
@Miraj98 I don't think you installed npm/node with the right permissions.. try with sudo npm install web3 or install npm/node correctly :)
I will close this issue because I can't see any errors on our side.
@nivida it is a proxy/firewall problem. I fixed it the help of my IT team.
git config --global hub.protocol https
will solve it.
here is on Macbook (OS X 10.11.6 (15G20015))
npm install web3
npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated [email protected]: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
> [email protected] preinstall /Users/IDK/node_modules/scrypt
> node node-scrypt-preinstall.js
> [email protected] install /Users/IDK/node_modules/scrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/IDK/anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:276:12)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:336:11)
gyp ERR! stack at emitOne (events.js:116:13)
gyp ERR! stack at Socket.emit (events.js:211:7)
gyp ERR! stack at Pipe._handle.close [as _onclose] (net.js:561:12)
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/IDK/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 '/Users/IDK/package.json'
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.14.3 but none is installed. You must install peer dependencies yourself.
npm WARN IDK No description
npm WARN IDK No repository field.
npm WARN IDK No README data
npm WARN IDK No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /Users/IDK/.npm/_logs/2018-10-04T21_41_54_923Z-debug.log
@CorentinPacaud
The same problem as yours. How did you solve this problem?
@Miraj98 I don't think you installed npm/node with the right permissions.. try with
sudo npm install web3or install npm/node correctly :)
Actually this sudo command solved my problem. weird... Usually I don't need to use it when install a package. But thanks anyway.
root@iZj6cbd4df3cja1epkztv9Z:~# sudo npm install web3
npm WARN deprecated tar.[email protected]: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support
[email protected] install /root/node_modules/websocket
(node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory '/root/node_modules/websocket/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
COPY Release/validation.node
make: Leaving directory '/root/node_modules/websocket/build'
/root
└─┬ [email protected]
└─┬ [email protected]
└─┬ [email protected]
└─┬ [email protected]
└── [email protected] (git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2)
npm WARN enoent ENOENT: no such file or directory, open '/root/package.json'
npm WARN root No description
npm WARN root No repository field.
npm WARN root No README data
npm WARN root No license field.
root@iZj6cbd4df3cja1epkztv9Z:~#
help
Not able to install web3.js on Ubuntu 18.04.1, getting the below error:
ubuntu@ubuntu:~/web3$ sudo npm install web3
npm ERR! Linux 4.15.0-43-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "web3"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code ENOSELF
npm ERR! Refusing to install web3 as a dependency of itself
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/web3/npm-debug.log
Please tell if I am doing it wrong.
npm-debug.log
Try to install npm install [email protected]
Sorry guys I can't reproduce this error. I've created a new folder and a package.json with
npm initafter that I installed web3 withnpm install web3and it works as expected. Have you tried todo this in a clean folder like i have?Versions:
OS: macOS High Sierra 10.13.6 NPM: 6.1.0 Node: 10.0.5
try with node 12.3.1, for some reason the error appears when updating node, its working fine with an old version of nodejs
hay I have answer of that just delete package-lock.json and run command "npm install"
I had same issue in windows 10 and i solved this by doing these steps.
or
https://github.com/nodejs/node-gyp
refer this link
This issue keeps popping up and keeps being closed. Its extremely annoying.
the issue is this : https://github.com/ethereum/web3.js/blob/58a4432cb19626254d10054e2a800ef178221a8f/packages/web3-providers/package.json#L31
Forces all of us to change global configs to forcebly use https instead of git protocol. Can we change this?
Most helpful comment
@nivida it is a proxy/firewall problem. I fixed it the help of my IT team.