Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install web3 npm install web3 fails #3069

Closed
chaitanya5 opened this issue Sep 13, 2019 · 3 comments
Closed

Cannot install web3 npm install web3 fails #3069

chaitanya5 opened this issue Sep 13, 2019 · 3 comments

Comments

@chaitanya5
Copy link

chaitanya5 commented Sep 13, 2019

web3 was working fine. But I don't know why web3 doesn't install anymore from today. I could use web3 1.2.1 previously in my other projects but it simply doesn't work anymore.Tried all solutions but still couldn't figure out.

`E:\Godfather\Smart Contracts\demo>npm install -g web3

[email protected] install C:\Users\Godfather\AppData\Roaming\npm\node_modules\web3\node_modules\sha3
node-gyp rebuild

C:\Users\Godfather\AppData\Roaming\npm\node_modules\web3\node_modules\sha3>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 )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Godfather\AppData\Local\Programs\Python\Python37\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "", 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:295:12)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack at Socket. (internal/child_process.js:430:11)
gyp ERR! stack at Socket.emit (events.js:203:13)
gyp ERR! stack at Pipe. (net.js:588:12)
gyp ERR! System Windows_NT 6.1.7601
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\Godfather\AppData\Roaming\npm\node_modules\web3\node_modules\sha3
gyp ERR! node -v v12.7.0
gyp ERR! node-gyp -v v3.8.0
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! C:\Users\Godfather\AppData\Roaming\npm-cache_logs\2019-09-13T17_42_53_292Z-debug.log`

@chaitanya5 chaitanya5 changed the title Cannot install web3. npm install web3 fails Cannot install web3 npm install web3 fails Sep 13, 2019
@davalapar
Copy link

Have you got the things required for node-gyp environment

  • Python
  • MSBuild Tools
  • Visual C++ Build Tools core features
  • Windows 8.1 SDK
  • Windows 10 SDK (10.0.x.x)

@chaitanya5
Copy link
Author

It worked before though.I never showed the error. And now it works again after 2 days. Strange !!
I don't know how that worked again but thanks anyway .

@nivida
Copy link
Contributor

nivida commented Sep 29, 2019

Closed because all of the required tools, packages, and also python have been listed from @davalapar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants