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.
Please install Node.js in version 8.11.3 LTS or higher.
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
--ltsoption to get the latest version with long term support like this:
$ nvm install --lts $ nvm use --lts
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
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.
$ 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
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
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:
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]
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
@nextor directly from the
masterbranch 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!