QmdmCURodUyRPJ8kv2RHPyfDJFgcpVMh4LCgp3mjVihs7n
Location | Action | Object | Time
Command Prompt | Enter | npm install -g web3@latest | 1
Command Prompt | Enter | npm link web3 | 66
Command Prompt | Enter | node | 72
Command Prompt | Enter | Web3 = require('web3');web3 = new Web3();web3.version; | 74
Explanation
We are going to install version 1.2.0 of the Web3.js package.
It is installed with the NPM package manager, which is a part of Node.js.
We install it with the -g option to install it in a global directory, so it can be used in different directories.
Several error messages are shown but they are not fatal. Later versions of Web3.js will solve this.
After the installation of the Web3 package we link to our current directory.
Finally we start node and request the version of the web3 package.
Prerequisites
Command prompt opened.
Node.js (including python and windows build tools) and Git (including linux command line tools) are present