Prerequisites
In order to make Embark work on our computer, we need to have some tools installed first. Make sure you have the following ready and in the correct version:
Once done, go ahead and install Embark.
Node
Please install Node.js in version 8.11.3 LTS or higher.
Quick tip:We recommend installing Node using the Node Version Manager. This is because it makes it very easy to install different versions of Node in isolated environments that don’t require users to change their permissions when installing packages. Find instructions on how to install NVM here.
Once that is done, we can install and select a specific Node version or use the
--lts
option to get the latest version with long term support like this:$ nvm install --lts $ nvm use --lts
IPFS (Optional)
IPFS can be used to distribute our application’s content on the decentralized IPFS nodes. This can be skipped in case this isn’t planned, however we do recommend it. Checkout IPFS’ installation guide to learn how to install IPFS on our local machine.
To verify that the installation was successful, simply run the following command:
$ ipfs --version
This outputs something like
ipfs version 0.4.17
Ethereum Client (Optional)
Embark can spin up an Ethereum node for us. To make this happen, an Ethereum client has to be installed on our machine as well. Embark already comes with Ganache CLI, a blockchain node emulator, which is accessible via Embark’s simulator command.
In case we want to run a real node, geth is a pretty good one. Check out the installation guide for our platform and verify our installation with:
$ geth version
Which should result in an output that looks like this (note that the exact version numbers may be different):
Geth
Version: 1.8.15-stable
Git Commit: 89451f7c382ad2185987ee369f16416f89c28a7d
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.10.4
Operating System: darwin
GOPATH=
GOROOT=/Users/travis/.gimme/versions/go1.10.4.darwin.amd64
Installing Embark
Alright, let’s install Embark so we can build our first application. As mentioned earlier, if anything is unclear or you run into problems, make sure to reach out to us on our dedicated channels, submit an issue on GitHub, or take a look at our troubleshooting guide.
We can install Embark using the Node Package Manager (no worries, that one comes with Node), like this:
$ npm -g install embark
After that, embark
should be available as a global command in our terminal of choice. Let’s verify this by running the following command:
$ embark --version
At the time of writing this guide, the output looked like this:
3.2.1
Installing Embark @next
While running npm install -g embark
will give us the latest and great stable version of Embark, we’re sometimes interested in trying out features that are in active development. The Embark team maintains a next
distribution tag on npm that can be used to install versions of Embark that aren’t stable.
$ npm -g install [email protected]
Installing Embark’s latest GitHub version
If we’re interested in getting whatever has landed last in the code base, we can install directly from Embark’s GitHub repository like this:
$ npm -g install embark-framework/embark
Warning:Installations with
@next
or directly from themaster
branch on GitHub are considered unstable and may have bugs, so please proceed with caution.
Awesome! We’re all set up. Let’s build our first decentralized application!