How to check installed web3 version with command line terminal?
Asked
Active
Viewed 2.7k times
11
5 Answers
16
From a command line: npm ls web3 or npm list web3.
By the way, this message has nothing to do with web3, it's telling you to upgrade npm itself.
goodvibration
- 26,003
- 5
- 46
- 86
10
npm install web3 installs web3.js, which has a version command documented here:
https://github.com/ethereum/wiki/wiki/JavaScript-API#web3versionapi
var version = web3.version.api;
console.log(version); // "0.2.0"
Shawn Tabrizi
- 8,008
- 4
- 19
- 38
0
You can check your node module versions using:
npm view <module> version
So just type on your terminal:
npm view web3 version
Federico Caccia
- 401
- 2
- 11
0
You may by the following:
Step-I: on your console write "node" and then enter
~/../currentDir> node
Then:
>var Web3 = require("web3");
>console.log(Web3.version);
Output:
'1.2.11' //version
Ank_247shbm
- 163
- 1
- 7
web3, it's telling you to upgradenpmitself. – goodvibration Jun 12 '18 at 06:03npmno web3 – qbsp Jun 12 '18 at 06:03