Development on Windows
This guide will describe two ways how to run Trezor Suite dev environment & build pipeline on a Windows system:
natively on Windows or through WSL.
Native Windows
Running the dev environment natively on Windows is not most straightforward, but it should offer best compatibility.
Prerequisites
- Install Python either via the Python for Windows installer, or from Microsoft Store
- Install latest Visual Studio Community with C++ build tools
- Make sure to install the "Desktop development with C++" workload
- FYI: it's necessary so that yarn packages with native code can be built,
node-gyp depends on it: details
- Install git using the installer and make sure to include git bash for Windows
- Install nodeJS version as per .nvmrc
- You may use nvm, but it's not officially supported on Windows; manual nodeJS installation will work
- Enable Yarn through npm
- Install Git LFS
- It is imperative that all further commands are run in bash for Windows, not in cmd or powershell!
- Especially, do not run any
yarn command in a shell other than bash for Windows. If you have done so, delete node_modules and start over.
Setup
Tips
- Exclude the
trezor-suite folder from Windows Defender, as it may slow down the build process considerably
Windows Subsystem for Linux
⚠ Using WSL is a more sandboxed way to run the dev env, but note that it is not actively maintained, and not all features may work.
Setup
On Windows:
In WSL:
Then proceed with the Getting Started instructions in README.
Connecting USB device
On Windows, run usbipd list, find the bus id of the Trezor device, e.g. 2-1.
Then run:
usbipd bind --busid 2-1
usbipd attach --wsl --busid 2-1
In WSL, run lsusb to confirm the device is visible.
Note: Without udev rules, the device will be visible by lsusb, but not in the app.
Development on Windows
This guide will describe two ways how to run Trezor Suite dev environment & build pipeline on a Windows system:
natively on Windows or through WSL.
Native Windows
Running the dev environment natively on Windows is not most straightforward, but it should offer best compatibility.
Prerequisites
node-gypdepends on it: detailsyarncommand in a shell other than bash for Windows. If you have done so, deletenode_modulesand start over.Setup
nvmstep, depending on your choice)Tips
trezor-suitefolder from Windows Defender, as it may slow down the build process considerablyWindows Subsystem for Linux
⚠ Using WSL is a more sandboxed way to run the dev env, but note that it is not actively maintained, and not all features may work.
Setup
On Windows:
In WSL:
sudo apt-get install build-essentialThen proceed with the Getting Started instructions in README.
Connecting USB device
On Windows, run
usbipd list, find the bus id of the Trezor device, e.g.2-1.Then run:
In WSL, run
lsusbto confirm the device is visible.Note: Without udev rules, the device will be visible by
lsusb, but not in the app.