UPDATE 2017/08/25:
Now that Truffle has made installation easier, I have cleaned up and streamlined the windows install steps below.
I highly recommend installing Truffle via WSL instead.
https://davidburela.wordpress.com/2017/05/12/how-to-install-truffle-testrpc-on-ubuntu-or-windows-10-with-windows-subsystem-for-Linux/
—
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 expect to be running on a Linux machine. Here is the simplest install steps I have found
Step 0. Don’t follow this guide, instead install via WSL
I do not recommend installing Node directly to Windows. Many NPM packages fail to test on Windows and as a result fail to install. Using “Windows Subsystem for Linux” on Windows 10 works much better. Follow my other guide:
https://davidburela.wordpress.com/2017/05/12/how-to-install-truffle-testrpc-on-ubuntu-or-windows-10-with-windows-subsystem-for-Linux/
If you don’t have Windows 10, and really want to install directly on Windows then continue.
Step 1. If you really want to continue: Install windows tools with chocolatey:
- Install Chocolatey via https://chocolatey.org/
Open a PowerShell prompt as Administrator
choco install nodejs.install -y choco install git -y choco install VisualStudioCode -y #optional
Read more about configuring Visual Studio code for Blockchain development in my other post.
Step 2. Install the tools via npm:
Open a NEW PowerShell prompt as Administrator (to ensure that it reloads the path)
npm install -g npm npm install -g --production windows-build-tools npm install -g ethereumjs-testrpc truffle
You may see some informational notes that optional components were skipped. You can run the commands truffle and testrpc.
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
[…] This configuration works really well with Truffle (as shown in the final screenshot). You can read how to install Truffle on Windows in my previous post https://davidburela.wordpress.com/2016/11/18/how-to-install-truffle-testrpc-on-windows-for-blockchai… […]
This no longer seems to work. On a blank machine the node installation fails. Only one step can be completed.
[…] I’m assuming you already have a Truffle project locally that you want to automate the continuous builds & testing on. Follow my tutorial on installing Truffle & TestRPC on Windows. […]
Works like a charm,
I am exploring blockchain, can you suggest the next logical post I should follow to move in right direction?
There is a small error in the text if you copy for deploy: ”npm install -g –production windows-build-tools”.
You get the error: Argument starts with non-ascii dash, this is probably invalid: [ ‘–production’, ‘windows-build-tools’ ].
It should be “npm install -g -production windows-build-tools”.
I’ve created an Ubuntu Dev Machine Azure ARM template that automates the install of VS Code, Truffle, TestRPC, Parity and the integration with VSTS using the TFVC tool. This repository can be found at: https://github.com/evanuum/azure-blockchain–ubuntu–blockchain–dev. I’m working on the Windows version of the template.
[…] previously wrote how you can install Truffle & TestRPC on a windows machine, by using the Windows installers for Node & […]
[…] allow developers to launch a development version of a blockchain on your computer. This is great for quick testing and development, so this is an absolutely critical skill for smart […]
hi, the truffledemo not exits on my Temp files and , Everything has gone well until then, the testrpc gave me as a result test accounts and etc … I only have problem with that, where is my truffledemo?
jajajaja. How silly I feel, but that’s how I learn. I had to create the folder … OMG …. it already works for me and I’ll start programming, … thank you!
I ran through the steps and simplified it further. and updated that screenshot for you (but the point was to show that `code .` worked, not the other commands)
for beginners like me: as SL says, you have to create a test folder and name it whatever you want (truffletest) via commands mkdir xyz, then enter it via cd xyz, and start with “truffle int”, after that with “code .” you will get the extension running… and it is awesome!
[…] https://davidburela.wordpress.com/2016/11/18/how-to-install-truffle-testrpc-on-windows-for-blockchai… […]
Hi David / anyone reading. First up thanks David for these super useful tutorials / posts. Really saved me a lot of time. I noticed after your latest update that the article is missing the command to install the windows build tools – npm install -g -production windows-build-tools. I think they are still needed – or at least some of them are, I just tried going through this setup again on a new machine and got quite a few errors when trying to run npm install on the truffle boxes – most seem to relate to python being missing but their could be others.
Thanks, I think you are correct. Windows-build-tools aren’t required for a basic install, but are required by some other npm commands. I’ll add it back in
Hi,
At which point should I run TestRPC. Some body please guide me.
Zulfi.
Do you need someone to read the instructions for you, Zulfi? Was there a particular word that was too complicated?