Skip to content

Commit 07de98b

Browse files
committed
Document solution to yarn package issue on Windows
1 parent 71bacf6 commit 07de98b

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ We do not use templates for reporting issues - anyone who has a question about h
7272
We appreciate contributions from the community, but as with any project a change suggested may not be something we choose to incorporate into the code base. If you have any questions about creation or implementation of a feature, please feel free to [open a new issue](https://github.com/StatTag/StatWrap/issues/new/choose) to solicit feedback.
7373

7474
## Solutions to Development Issues
75+
7576
If when running the project locally, you get the following error:
7677

7778
```
@@ -83,11 +84,13 @@ Error: ENOSPC: System limit for number of file watchers reached, watch '/home/<u
8384
at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
8485
at Object.watch (node:fs:2392:36)
8586
```
87+
8688
You will need to increase the number of file watchers available, to its maximum, by running the following command:
8789

8890
For debian-based distros:
8991

9092
Execute this command:
93+
9194
```
9295
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
9396
```
@@ -156,6 +159,32 @@ yarn package
156159

157160
_(Solution courtesy of: https://github.com/marktext/marktext/issues/3175#issuecomment-1208840633)_
158161

162+
## Solutions to Packaging Issues
163+
164+
On Windows, if when trying to run `yarn package`, you may see the following error from electron-builder:
165+
166+
```
167+
errorOut=ERROR: Cannot create symbolic link : <some path>
168+
```
169+
170+
Looking back at the error, you will notice that it is failing when trying to download and extract a temporary copy of `winCodeSign`:
171+
172+
```
173+
Extracting archive: C:\Users\<username>>\AppData\Local\electron-builder\Cache\winCodeSign\618674575.7z
174+
```
175+
176+
This has to do with how `winCodeSign` is packaged up, where it wants to create symlinks for some lib files. If you search for this error, some recommendations are to run `yarn package` with administrative rights. **This is not adviseable** - you should not have to run the packaging process with elevated rights, and it opens potential security risks. Instead, follow these steps:
177+
178+
> "Download the winCodeSign.7z package manually. You can use the same URL as electron-builder is using:
179+
> https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z
180+
181+
> Then extract the archive to the requested location (I've used 7-Zip 23.01 for Windows) so that you have this folder on your machine:
182+
> C:\Users\<YourUserName>\AppData\Local\electron-builder\Cache\winCodeSign\winCodeSign-2.6.0\"
183+
184+
_(Solution courtesy of: https://github.com/electron-userland/electron-builder/issues/8149#issuecomment-2079252400)_
185+
186+
This should be a one-time change to your system. Once this folder is set up, you should be able to run `yarn package`, and the build process will use the existing copy of `winCodeSign` instead of trying to download a new one.
187+
159188
## Packaging and Notarization (macOS)
160189

161190
**NOTE** These steps are only needed for official release builds of StatWrap. Local development and packaging should not require these steps.

0 commit comments

Comments
 (0)