web3.js not installing
C:>e:
E:>mkdir test
E:>cd test
E:\test>npm init This utility will walk you through creating a package.json file. It only covers the most common items, and tries to guess sensible defaults.
See npm help json for definitive documentation on these fields
and exactly what they do.
Use npm install <pkg> afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit. package name: (test) version: (1.0.0) description: entry point: (index.js) test command: git repository: keywords: author: license: (ISC) About to write to E:\test\package.json:
{ "name": "test", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "author": "", "license": "ISC" }
Is this OK? (yes)
E:\test>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 E:\test\node_modules\scrypt node node-scrypt-preinstall.js
[email protected] install E:\test\node_modules\scrypt node-gyp rebuild
E:\test\node_modules\scrypt>if not defined npm_config_node_gyp (node "C:\Users\kaushik\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\kaushik\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\kaushik\AppData\Local\Programs\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "
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\kaushik\AppData\Roaming\npm-cache_logs\2018-11-03T07_03_58_094Z-debug.log**
E:\test>**
You have a problem with node-gyp, not with web3
You have a problem with
node-gyp, not withweb3
then, how to solve it
Google it, depends on your errors https://github.com/nodejs/node-gyp#installation try this for example
You should probably install Python 2.7, not 3.x.
@thundo makes a good point, node-gyp does not work with python v3.x as stated by their github page https://github.com/nodejs/node-gyp
Also, I think just update Node
have you seen https://github.com/ethereum/web3.js/issues/1783#issuecomment-405650471 ? Kind regards!
Closed because of the ongoing clean up of the issue list. Feel free to ask this in our gitter channel or on stackoverflow.