1
1
---
2
2
title : Building Zen Browser 📦
3
- lastmod : 2024-09-25
3
+ lastmod : 2025-04-03
4
4
---
5
5
6
6
We've taken the time to make building Zen Browser as easy as possible, independent of your operating system or technical knowledge.
7
7
8
+ #### Basic Requirements
9
+
10
+ The following resources are essential for a successful build. Without them, you will encounter unnecessary build failures:
11
+
12
+ - Disk Space: Keep _ 30GB_ of free space on the disk (the build process is resource-intensive).
13
+ - Git ([ Download here] ( https://git-scm.com/downloads ) ) – Required for version control and managing source code.
14
+ - Python 3 ([ Download here] ( https://www.python.org/downloads/ ) ) – Needed for running build scripts and automation tools.
15
+ - Node.js 21+ ([ Download here] ( https://nodejs.org/ ) ) – Required for managing dependencies and running JavaScript-based tools.
16
+ - MozillaBuild ([ Download here] ( https://wiki.mozilla.org/MozillaBuild ) ) – Required for ` mach ` and Gecko compilation.
17
+ - 7-Zip ([ Download here] ( https://www.7-zip.org/download.html ) ) – Used to extract Firefox source archives.
18
+ - sccache ([ Download here] ( https://github.com/mozilla/sccache/releases ) ) – A caching tool that speeds up rebuilds by storing compiled objects.
19
+
20
+ > ** Note:** If you're using Windows, ensure that all the basic software requirements are added to the ` PATH ` variable.
21
+
8
22
> [ !failure]
9
23
> We cannot provide support if a build fails. Please understand this before proceeding with the following steps.
10
24
@@ -59,6 +73,16 @@ npm run build
59
73
60
74
This command compiles the source code and creates the necessary files for running Zen Browser.
61
75
76
+ - If your changes are only in JavaScript, you can run the following command after completing the first build for faster rebuilds:
77
+
78
+ ``` bash
79
+ npm run build:ui
80
+ ```
81
+
82
+ This skips unnecessary compilation steps and only rebuilds the UI components.
83
+
84
+ For changes in other languages or core functionality, you should always run the full build using ` npm run build ` after every code change.
85
+
62
86
## Step 6: Run the Browser
63
87
64
88
After building the browser, you can start it using:
@@ -68,3 +92,43 @@ npm start
68
92
```
69
93
70
94
This command launches the browser, allowing you to see your changes in action.
95
+
96
+ ---
97
+ ---
98
+
99
+ ### Common Build Errors & Fixes
100
+
101
+ #### Q: "mach not found" error?
102
+ > Install [ MozillaBuild] ( https://wiki.mozilla.org/MozillaBuild ) , add it to your ` PATH ` , then restart your terminal.
103
+
104
+ #### Q: "7z" or "7-Zip" missing during build?
105
+ > Download [ 7-Zip] ( https://www.7-zip.org/ ) , add it to your ` PATH ` , then restart your terminal.
106
+
107
+ #### Q: "Unsupported Microsoft Visual Studio version" or build failing for similar reasons on Windows?
108
+ > Ensure Visual Studio is installed with the "Desktop development with C++" workload and Windows 10/11 SDK.
109
+
110
+ #### Q: Build stuck or freezing?
111
+ > Try running with fewer threads:
112
+ > ``` sh
113
+ > npm run build -- --jobs 2
114
+ > ` ` `
115
+
116
+ # ### Q: "Git submodule" errors after cloning?
117
+ > Run:
118
+ > ` ` ` sh
119
+ > git submodule update --init --recursive
120
+ > ` ` `
121
+
122
+ # ### Q: "npm run init" fails?
123
+ > Manually bootstrap the project:
124
+ > ` ` ` sh
125
+ > npm run bootstrap
126
+ > ` ` `
127
+
128
+ # ### Q: "zen.exe" not found after build?
129
+ > Perform a clean rebuild:
130
+ > ` ` ` sh
131
+ > npm run reset-ff && npm run init && npm run build
132
+ > ` ` `
133
+
134
+ ---
0 commit comments