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

web3.js not installing

Open aparnathi567 opened this issue 8 years ago • 8 comments

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 "", 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 Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) gyp ERR! System Windows_NT 10.0.17134 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\kaushik\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd E:\test\node_modules\scrypt gyp ERR! node -v v8.12.0 gyp ERR! node-gyp -v v3.8.0 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. 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>**

aparnathi567 avatar Nov 03 '18 07:11 aparnathi567

You have a problem with node-gyp, not with web3

mqklin avatar Nov 14 '18 15:11 mqklin

You have a problem with node-gyp, not with web3

then, how to solve it

aparnathi567 avatar Nov 15 '18 15:11 aparnathi567

Google it, depends on your errors https://github.com/nodejs/node-gyp#installation try this for example

mqklin avatar Nov 15 '18 15:11 mqklin

You should probably install Python 2.7, not 3.x.

thundo avatar Nov 19 '18 09:11 thundo

@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

huanzhang89 avatar Dec 03 '18 18:12 huanzhang89

Also, I think just update Node

EddieOne avatar Mar 01 '19 00:03 EddieOne

have you seen https://github.com/ethereum/web3.js/issues/1783#issuecomment-405650471 ? Kind regards!

paulmelero avatar Apr 03 '19 14:04 paulmelero

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