You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**`--recurse-submodules`**: This flag ensures that all submodules are cloned along with the main project. Zen Browser relies on several submodules, so this step is essential.
38
+
-**`--depth 10`**: This makes sure you dont download the entire git history, it would take a long time otherwise due to that we used to store compiled binaries on the repository.
21
39
22
40
## Step 2: Install Dependencies
23
41
@@ -59,6 +77,16 @@ npm run build
59
77
60
78
This command compiles the source code and creates the necessary files for running Zen Browser.
61
79
80
+
- If your changes are only in JavaScript, you can run the following command after completing the first build for faster rebuilds:
81
+
82
+
```bash
83
+
npm run build:ui
84
+
```
85
+
86
+
This skips unnecessary compilation steps and only rebuilds the UI components.
87
+
88
+
For changes in other languages or core functionality, you should always run the full build using `npm run build` after every code change.
89
+
62
90
## Step 6: Run the Browser
63
91
64
92
After building the browser, you can start it using:
@@ -68,3 +96,40 @@ npm start
68
96
```
69
97
70
98
This command launches the browser, allowing you to see your changes in action.
99
+
100
+
---
101
+
102
+
### Common Build Errors & Fixes
103
+
104
+
#### Q: "mach not found" error?
105
+
> Install [MozillaBuild](https://wiki.mozilla.org/MozillaBuild), add it to your `PATH`, then restart your terminal.
106
+
107
+
#### Q: "7z" or "7-Zip" missing during build?
108
+
> Download [7-Zip](https://www.7-zip.org/), add it to your `PATH`, then restart your terminal.
109
+
110
+
#### Q: "Unsupported Microsoft Visual Studio version" or build failing for similar reasons on Windows?
111
+
> Ensure Visual Studio is installed with the "Desktop development with C++" workload and Windows 10/11 SDK.
112
+
113
+
#### Q: Build stuck or freezing?
114
+
> Try running with fewer threads:
115
+
> ```sh
116
+
> npm run build -- --jobs 2
117
+
>```
118
+
119
+
#### Q: "Git submodule" errors after cloning?
120
+
> Run:
121
+
>```sh
122
+
> git submodule update --init --recursive
123
+
>```
124
+
125
+
#### Q: "npm run init" fails?
126
+
> Manually bootstrap the project:
127
+
>```sh
128
+
> npm run bootstrap
129
+
>```
130
+
131
+
#### Q: "zen.exe" not found after build?
132
+
> Perform a clean rebuild:
133
+
>```sh
134
+
> npm run reset-ff && npm run init && npm run build
0 commit comments