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

Web3 not installing correctly. using "npm install web3", "npm install web3 -latest

Open conwise18 opened this issue 8 years ago • 11 comments

conwise18 avatar Mar 09 '18 07:03 conwise18

192-168-1-109:~ connor$ npm install web3@^1.0.0 npm ERR! code ETARGET npm ERR! notarget No matching version found for web3@^1.0.0 npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/connor/.npm/_logs/2018-03-09T07_22_40_901Z-debug.log 192-168-1-109:~ connor$ 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] install /Users/connor/node_modules/web3-providers-ws/node_modules/websocket (node-gyp rebuild 2> builderror.log) || (exit 0)

CXX(target) Release/obj.target/bufferutil/src/bufferutil.o SOLINK_MODULE(target) Release/bufferutil.node CXX(target) Release/obj.target/validation/src/validation.o SOLINK_MODULE(target) Release/validation.node npm WARN connor No description npm WARN connor No repository field. npm WARN connor No license field.


192-168-1-109:~ connor$ npm install web3 latest npm WARN [email protected] had bundled packages that do not match the required version(s). They have been replaced with non-bundled versions. npm WARN connor No description npm WARN connor No repository field. npm WARN connor No license field.


192-168-1-109:~ connor$ npm install ethereum/web3.js -save npm WARN connor No description npm WARN connor No repository field. npm WARN connor No license field.

  • [email protected] added 5 packages from 7 contributors and updated 1 package in 223.995s

conwise18 avatar Mar 09 '18 07:03 conwise18

Can you clarify what exactly isn't working correctly? Other than the time you installed a package called latest it appears to have worked right in each case?

You do appear to be running npm install inside your home directory, which doesn't seem like it is what you intended.

gburtini avatar Mar 13 '18 00:03 gburtini

problem is solved! just did a restart and it was working fine. thanks!

conwise18 avatar Mar 14 '18 04:03 conwise18

the problem was web3 not connecting to a node console and not allowing me to interact with it

conwise18 avatar Mar 14 '18 04:03 conwise18

Great to hear. Go ahead and close this issue then. :+1:

gburtini avatar Mar 14 '18 05:03 gburtini

The problem with web3@^0.20.0 and probably with other versions earlier than web3@^1.0.0-beta.36 is that modules like web3.utils necessary for getting balances, building transactions etc. don't seem to work or perhaps even exist, so installing the 0.20.0 version doesn't really solve the problem. I am not 100% sure, but it seems that running npm install --global --production windows-build-tools from Windows PowerShell (as an ADMIN!) and then installing web3@^1.0.0-beta.36 is the only way.

igoreskin avatar Nov 04 '18 03:11 igoreskin

The problem with web3@^0.20.0 and probably with other versions earlier than web3@^1.0.0-beta.36 is that modules like web3.utils necessary for getting balances, building transactions etc. don't seem to work or perhaps even exist, so installing the 0.20.0 version doesn't really solve the problem. I am not 100% sure, but it seems that running npm install --global --production windows-build-tools from Windows PowerShell (as an ADMIN!) and then installing web3@^1.0.0-beta.36 is the only way.

I am having the same problem. My application shows that it is using 0.20.7 version and i can't get some very important functions to work while i have installed latest version on my system and in the project directory too, even in the package json file and in other dependencies it's ^1.2.1 but still my application is using 0.20.7. I can't understand why and can't resolve it.

saadibrahimiv avatar Jun 09 '20 09:06 saadibrahimiv

@saadibrahimiv eventually you have got a package-lock.json file in your directory which you need to delete?

holgerd77 avatar Jun 09 '20 09:06 holgerd77

@saadibrahimiv eventually you have got a package-lock.json file in your directory which you need to delete?

getpastevent_query still getting the same web3 version

saadibrahimiv avatar Jun 09 '20 10:06 saadibrahimiv

@saadibrahimiv

You might find this Metamask gist to instantiating Web3 helpful.

cgewecke avatar Jun 09 '20 15:06 cgewecke

@saadibrahimiv

You might find this Metamask gist to instantiating Web3 helpful.

I solved it by using cdn in my html.

saadibrahimiv avatar Jun 09 '20 22:06 saadibrahimiv