How to install Truffle & TestRPC on Windows for Blockchain development

I have been doing a bunch of Blockchain development work, one of which was recently featured on the front page of the Australian Financial Review and on Microsoft’s news website.

One of the trickiest things has been trying to get Windows environments correctly configured, as the tools are npm based and want to be compiled natively and assumes it is on a Linux machine. Here is the simplest install script I have found

Step 0. Pre-step:

Step 1. Install windows tools with chocolatey:
Open a PowerShell prompt as Administrator

image

Step 2. Install the tools via npm:
Open a NEW PowerShell prompt as Administrator (to ensure that it reloads )

  • npm install -g npm
  • npm install -g –production windows-build-tools
  • npm install -g ethereumjs-testrpc
  • npm install -g truffle

You may see some error messages during npm installs. Many of these are just informational / optional components failing. You can test that it is all working by trying to run the commands truffle and testrpc.
imageimage

 

Bonus Step: combining with Visual Studio Code
This is how I use Truffle & Visual Studio code together. Make sure you install and configure Visual Studio Code with the Solidity extensions.
If you navigate into the folder where your files are, typing “code .” will open Visual Studio Code in the current folder. Running the command after a truffle init gets you up and running quickly

image
image

2 thoughts on “How to install Truffle & TestRPC on Windows for Blockchain development

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s