Blockchain on errors: Windows challenge.

Sergei Stadnik
2 min readOct 31, 2019

--

Photo by Kristina Flour on Unsplash
I `ll tell you a little secret: 

my addiction to Windows got me to the point of no return.

Should I probably consider Ubuntu 18?

When my friend Evgeny and I both working on the same blockchain project, what is dragging my feet is the fact I often get unpredictable errors on my Windows machine (he believes in Mac ).

Oh, well, mea culpa.

There are certain steps one should take to adjust the Windows environment. I wanted to verify them and produced a transcript from Dapp University, my favorite YouTube blockchain channel.

It took me a while to find a trustful source of the information while I was learning Solidity. Some of the videos are outdated, some are too complicated, some don`t make sense.

Gregory, the owner of the channel, does a brilliant job keeping us updated on all aspects of blockchain development and even beyond that.

Again, I wanted to demonstrate those steps and verify they work for me.

Let`s rock-n-roll.

1. Install chocolatey (https://chocolatey.org/) package manager for Windows.

2. choco install nodejs

NOTE! Please check if you have node in your environmental variables under Path (e.g. C:\Program Files\nodejs\)

3. choco install python

4. Install visual studio 2015

(https://stackoverflow.com/questions/44290672/how-to-download-visual-studio-community-edition-2015-not-2017)

NOTE! During the installation, select the custom one, and click on C++ under programming languages (select web installer)

5. Run node-gyp

npm install --global node-gyp@3.6.2

NOTE ! This line of code above gave me an error, so please proceed with the steps below:

npm install --production windows-build-tools

npm install web3, and finally

npm audit fix

6. Configure python

npm config set python python2.7 --global

7. Configure path to the executable

npm config set python C:\Python38\python.exe --global

(verify it exists under C:\Program Files\Python27)

8. Set the version for Microsoft Visual Studio

npm config set msvc_version 2015 --global

9.Update VS target path

Change ChocolateyLastPathUpdate in environmental variables

to VCTargetsPath under variable name and variable value to C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140

Verify it is set by typing in powershell : echo $env:VCTargetsPath

10. install git

choco install git

11. install truffle

npm install --global truffle@5.0.5

12. install react

npm install --global create-react-app@2.1.3

Additionally, here is link from another source that duplicates

the whole process.

https://github.com/ethereum/web3.js/issues/1783

I hope those steps made the installation process less painful. Please let me know if you were getting an error, or just have a question we can then work on your issue together!

Happy coding, Sergei Stadnik

--

--