workaround for EACCESS / EPERM when bundled for single-file-executable#12
Merged
AlbertShown merged 2 commits intowebui-dev:mainfrom Dec 29, 2025
Merged
workaround for EACCESS / EPERM when bundled for single-file-executable#12AlbertShown merged 2 commits intowebui-dev:mainfrom
AlbertShown merged 2 commits intowebui-dev:mainfrom
Conversation
AlbertShown
approved these changes
Dec 29, 2025
Member
|
Thank you Jay 👍 Similar issue here #9, but we are looking for a way to embed dynamic libraries (.dll, .dynlib, .so) into single-file-executable. |
Contributor
Author
I've actually been working on something for this myself, once I get it more stable I'd love to share some more info :3 |
|
Doesn't work: |
Member
|
Error is : I think we should just import it like this: import { homedir } from "node:os";
import { resolve } from "node:path"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When i was playing around with the library myself i constantly ran into errors like below when running it in a compiled single-file-executable.
It seems to be bacause of the way bun's virtual fs paths are returned - and it could def be fixed in a cleaner way, but this does work as a temporary workaround.
All it does is detect
$bunfsin the function that returns thecurrentModulePath- and instead makes it fallback topath.resolve(process.cwd(), "vfs")I've tested it myself, and it works in single-file-executables.
sysinfo in case it matters later, tested on:
Bun v1.3.6-canary.22+3898ed5e3
Arch Linux x64 (Linux 6.17.7-zen)