Using Windows
How to set up a local development environment using Windows.
​
Many popular tools and resources for blockchain development are written for developers working on UNIX machines. It is common for developers working on Windows to encounter errors that are not covered in the documentation and have no luck with Google. Fortunately, Microsoft makes it easy to run a UNIX machine directly from a Windows desktop with the Windows Subsystem for Linux.

Open PowerShell as an administrator and run
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Restart your computer when prompted.
Next, install a Linux distribution from the Microsoft Store. When developing this guide, we chose Ubuntu.
Set up your Linux distro by setting a username and password then update and upgrade the packages by running the following command in the terminal:
sudo apt update && sudo apt upgrade
You can view the source documentation for setting up the Linux distro here and the Microsoft documentation for setting up the Windows Subsystem for Linux here.

Now that you have Linux installed, let’s install nvm and yarn. Nvm (node version manager) makes it easy to install and manage different versions of Node.js. The following instructions are from the celo-monoreop setup documentation for Linux.
Run the following commands in the Linux terminal.
# Installing Nvmcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bashsource ~/.bashrc# Setting up the right version of Nvmnvm install 12nvm alias default 12
Running $ node -v in the terminal should print a node version if it is installed correctly.

You can now start working on your projects in your Linux environment. Install the WSL VS Code extension for a seamless integration between VS Code and WSL.
Be aware that networking will be different depending on which version of WSL you are using. The details of managing network interfaces goes beyond the scope of this guide, but you can learn more here.

Copy link
On this page