Requirements
There are a few technical requirements before we start.
- Git
- Node.js and NPM
- Code editor
Git
Git is version control system, which is used for some other dependencies.
Also it has some utilities, like Git Bash
.
Maybe Git may already be installed. To find out, open a terminal and enter:
git --version
There are several ways to install Git. Check it out in the tutorial Install Git
Windows OS
There are other options for Windows:
Node.js and NPM
Another dependency is NPM, which comes bundled with Node.js.
To check if you have node already installed, enter this command into your terminal:
node --versionnpm --version
This is the result in a Windows OS:
If there's no output like the one above, here's how to install it on Ubuntu, Mac OSX and Windows.
Linux
sudo apt updatesudo apt install curl gitsudo apt install build-essential # We need this to build native dependenciescurl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -sudo apt install nodejs
Mac OS
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.2/install.sh | bashnvm install 12nvm use 12nvm alias default 12npm install npm --global # Upgrade npm to the latest version
Make sure you have node-gyp
installed:
npm install -g node-gyp
This next setp is needed to build native dependencies. A popup will appear and you have to proceed with an installation. It will take some time, and may download a few GB of data.
xcode-select --install
Windows OS
Installing Node.js on Windows requires a few manual steps.
Go to Node.js to download and install it.
Then open your terminal as Administrator
Also you need to install NPM's Windows Build Tools
npm install --global --production windows-build-tools
and run the following command:
npm install -g node-gyp
Comments about Node.js and NPM
NPM is usually installed together with Node.js, so after installing Node.js, there's no need to install it separately.
If you want to have more than one version installed,
the most fuss-free way to install and manage multiple versions of node
on your computer is
nvm . Note that nvm
was used in Mac OSX.
If you're seeing errors mentioning "node-gyp", you need to install it.
Code editor
We need some software that is able to edit text files. Preferably one that has support for syntax highlighting for both Solidity and Javascript.
VS Code is a good choice if you don't already have one.
Visual Studio Code (VS Code)
Go to VS Code download if you would like to use it too.
Verify if your VS Code installation was successful by typing the following command into the terminal:
code -v
VSCode extension for Solidity
If you decided to use VSCode, it is great to have Solidity support. I use the solidity extension from Juan Blanco .
To install it, go to extensions (Menu View -> Extensions):
- Type
solidity
in the search field. - Select
solidity
extension from Juan Blanco. - Click
install
.
Next steps
All prerequisites are already installed.
Now you will get to know web3 and then create your first frontend!