Closed qm3ster closed 2 months ago
⚙ Preparing app for bun...
[pid 120725] access("/home/u/p/.output/server", F_OK) = -1 ENOENT (No such file or directory)
[pid 120725] access("/home/u/p/.output/public", F_OK) = 0
[pid 120759] unlinkat(AT_FDCWD</home/u/p>, "/home/u/p/.output/public", 0) = -1 EISDIR (Is a directory)
[pid 120759] openat(AT_FDCWD</home/u/p>, "/home/u/p/.output/public", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_DIRECTORY) = 15</home/u/p/.output/public>
[pid 120759] unlinkat(15</home/u/p/.output/public>, "favicon.ico", 0) = 0
[pid 120759] unlinkat(AT_FDCWD</home/u/p>, "/home/u/p/.output/public", AT_REMOVEDIR) = 0
[pid 120755] mkdir("/home/u/p/.output/public", 0777) = 0
[pid 120757] stat("/home/u/p/public", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
[pid 120725] stat("/home/u/p/public", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
[pid 120756] stat("/home/u/p/public/**", 0xa6bcd79d810) = -1 ENOENT (No such file or directory)
[pid 120759] openat(AT_FDCWD</home/u/p>, "/home/u/p/public", O_RDONLY|O_DIRECTORY) = 15</home/u/p/public>
[pid 120725] access("/home/u/p/.output/public/favicon.ico", F_OK) = -1 ENOENT (No such file or directory)
[pid 120755] lstat("/home/u/p/public/favicon.ico", {st_mode=S_IFREG|0664, st_size=664, ...}) = 0
[pid 120755] openat(AT_FDCWD</home/u/p>, "/home/u/p/public/favicon.ico", O_RDONLY|O_NOFOLLOW) = 15</home/u/p/public/favicon.ico>
[pid 120755] openat(AT_FDCWD</home/u/p>, "/home/u/p/.output/public/favicon.ico", O_WRONLY|O_CREAT, 0666) = 19</home/u/p/.output/public/favicon.ico>
[pid 120755] copy_file_range(15</home/u/p/public/favicon.ico>, [0], 19</home/u/p/.output/public/favicon.ico>, [0], 664, 0) = -1 EINVAL (Invalid argument)
ERROR { [EINVAL: Invalid argument] 1:16:26 AM
code: 'EINVAL',
path: '/home/u/p/.output/public/favicon.ico',
syscall: 'copy_file_range',
errno: -22 }
I must be an idiot, because I see nothing wrong happening (up until the error) :horse:
It was ecryptfs (old encrypted home on ubuntu)
BUN_CONFIG_DISABLE_COPY_FILE_RANGE=true
helps
Building for production with Bun causes
EINVAL -22
incopy_file_range
syscall when putting files into.output
. (It doesn't just affect/public/favicon.ico
, if I remove all ofpublic
it fails the same way on some cache-busted css file, etc.)Versions:
OS: Ubuntu 24.04 Runtime: bun v1.1.27 (I tried older ones down to 1.0.30, the error is exactly the same) vinxi: v0.4.3 (installs vite v5.4.5)
How to replicate:
Output: