Open yvz5 opened 1 year ago
@yvz5 What base image are you running? If possible, could you provide the full Dockerfile?
FROM node:16.16.0
WORKDIR /build
RUN curl -fsSL https://bun.sh/install | bash
COPY package.json /build
RUN ~/.bun/bin/bun install >&2
package.json
{
"name": "a",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@instana/collector": "^2.13.0",
"@tusbar/cache-control": "^0.6.1",
"@wireapp/lru-cache": "^3.8.1",
"agentkeepalive": "^4.2.1",
"ajv": "^8.11.2",
"avsc": "^5.7.7",
"axios": "^0.27.2",
"body-parser": "^1.20.1",
"chokidar": "^3.5.3",
"cookie-parser": "^1.4.6",
"dns-cache": "^2.0.0",
"ejs": "^3.1.8",
"express": "^4.18.2",
"express-hawk": "^1.1.1",
"express-promise-router": "^4.1.1",
"html-entities": "^2.3.3",
"ioredis": "^5.2.4",
"jsonwebtoken": "^8.5.1",
"kafkajs": "^2.2.3",
"method-override": "^3.0.0",
"murmurhash": "^2.0.1",
"node-jose": "^2.1.1",
"opossum": "^7.0.1",
"path-to-regexp": "^3.1.0",
"pino": "^8.7.0",
"polyfill-library": "^4.5.0",
"prom-client": "^14.1.0",
"toobusy-js": "^0.5.1"
}
}
I think it has something todo with this combination of packages. If I only add express as a dependency, it works. If I then keep adding more packages from the above list, it starts throwing these error messages about the integrity. I tried to nail it down to a single package but it seems like it is random each time. after a while started even complaining about express. Note that above combination of dependencies work locally with bun cli. Error happens only in a docker container.
I am seeing the same thing just on CI on CircleCI
resource_class: arm.medium
machine:
image: ubuntu-2004:202201-02
Not a docker container as I am using a machine executor running ubuntu.
Same issue for me
example log:
[1.42ms] ".env"\n' +
'bun install v0.5.2 (f9fd7e9d)\n' +
' Resolving dependencies\n' +
'Integrity check failed for tarball: @aws-sdk/querystring-parser\n' +
'error: IntegrityCheckFailed extracting tarball for @aws-sdk/querystring-parser\n' +
'Error ShortRead decompressing uWebSockets.js\n'
We recently launched a new Docker image at oven/bun
. Could you try that and see if that fixes this issue for you?
Does not fix for me
Dockerfile:
FROM oven/bun
WORKDIR /app
COPY package.json ./
RUN bun install
COPY . .
EXPOSE 3000
CMD [ "bun", "run", "build:start" ]
package.json:
{
"name": "listr_frontend",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"build:start": "next build && next start"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^6.3.0",
"daisyui": "^2.50.0",
"file-saver": "^2.0.5",
"ioredis": "^5.3.0",
"next": "13.1.6",
"postcss-cli": "^10.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"swr": "^2.0.3",
"uuid": "^9.0.0"
},
"devDependencies": {
"autoprefixer": "^10.4.13",
"postcss": "^8.4.21",
"sass": "^1.58.0",
"cssnano": "^4.1.10",
"tailwindcss": "^3.2.6"
}
}
truncated output:
=> => # bun install v0.5.6 (ddec9e0b)
=> => # Resolving dependencies
=> => # Integrity check failed for tarball: postcss-cli
=> => # error: IntegrityCheckFailed extracting tarball for postcss-cli
That the failure is in the integrity check step is suspicious. It sounds like a new error. cc @alexlamsl
As a temporary workaround, set the environment variable BUN_CONFIG_NO_VERIFY=1
and that will skip the integrity check. This is likely a real bug though and skipping the integrity check would mean the package then fails to extract or has nonsensical data inside
Same issue here. BUN_CONFIG_NO_VERIFY=1
doesn't affect anything.
Are people still seeing this on Bun v0.5.7? We are having trouble reproducing the issue.
Are people still seeing this on Bun v0.5.7? We are having trouble reproducing the issue.
Still seeing it on that version:
You can reproduce this by building a Bun repository on https://hop.io
I'm trying to deploy this repository specifically: https://github.com/SaltyAom/elysia-demo
What’s the Linux kernel version?
On Tue, Feb 28, 2023 at 4:45 PM Phineas @.***> wrote:
Are people still seeing this on Bun v0.5.7? We are having trouble reproducing the issue.
Still seeing it on that version: [image: image] https://user-images.githubusercontent.com/6209808/222015919-bcc830f4-4c29-4246-b7bf-042482c09d8b.png
You can reproduce this by building a Bun repository on https://hop.io
I'm trying to deploy this repository specifically: https://github.com/SaltyAom/elysia-demo
— Reply to this email directly, view it on GitHub https://github.com/oven-sh/bun/issues/1590#issuecomment-1449141873, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFNGS53MLAO3AYAMGYDUHDWZ2L25ANCNFSM6AAAAAASYCDXAA . You are receiving this because you commented.Message ID: @.***>
What’s the Linux kernel version?
Linux cd0e5af18575 5.15.0-47-generic #51-Ubuntu SMP Thu Aug 11 07:51:15 UTC 2022 x86_64 GNU/Linux
can confirm it doesnt happen on windows 10
+1, also having this issue on Ubuntu
Same here , i literally tryed this atleast 300-400 (seriously) times and i still getting this issue even with cache in manual install its does gets installed but in docker build breaking it i get pass because project rules , (there shouldn't be any errors)
I really wish I knew how to reproduce this failure. Attempting to run a Docker image doesn't reproduce it on an Ubuntu host running Linux kernel 5.17.
My best guess right now is either:
Try to use github actions. It is the same thing
Providing some info about the environment on a container where I can reproduce the issue. We're also using DinD (docker in docker) using the sysbox runtime.
ulimit:
root@9f076edf88e6:~# ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 2062438
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1048576
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
mem:
root@9f076edf88e6:~# free -g
total used free shared buff/cache available
Mem: 503 82 20 0 400 417
Swap: 7 2 5
filesys:
root@9f076edf88e6:~# stat -f -c %T /
UNKNOWN (0x6a656a62)
root@9f076edf88e6:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
. 1949358100 647577052 1301781048 34% /
tmpfs 1024 0 1024 0% /sys/kernel/config
tmpfs 1024 0 1024 0% /sys/kernel/debug
tmpfs 1024 0 1024 0% /sys/kernel/tracing
tmpfs 65536 0 65536 0% /dev
shm 65536 0 65536 0% /dev/shm
udev 263992092 0 263992092 0% /dev/tty
/dev/mapper/docker--vg-overlay 1949358100 647577052 1301781048 34% /etc/hosts
/dev/mapper/ubuntu--vg-ubuntu--lv 205839032 23389940 172974656 12% /var/lib/k0s
tmpfs 264077504 0 264077504 0% /proc/asound
tmpfs 264077504 0 264077504 0% /proc/acpi
tmpfs 264077504 0 264077504 0% /proc/scsi
tmpfs 264077504 0 264077504 0% /sys/firmware
cpu:
root@9f076edf88e6:~# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 48 bits physical, 48 bits virtual
CPU(s): 256
On-line CPU(s) list: 0-254
Off-line CPU(s) list: 255
Thread(s) per core: 1
Core(s) per socket: 64
Socket(s): 2
NUMA node(s): 16
Vendor ID: AuthenticAMD
CPU family: 25
Model: 1
Model name: AMD EPYC 7713 64-Core Processor
Stepping: 1
CPU MHz: 1449.351
CPU max MHz: 3720.7029
CPU min MHz: 1500.0000
BogoMIPS: 4000.12
Virtualization: AMD-V
L1d cache: 32K
L1i cache: 32K
L2 cache: 512K
L3 cache: 32768K
NUMA node0 CPU(s): 0-7,128-135
NUMA node1 CPU(s): 8-15,136-143
NUMA node2 CPU(s): 16-23,144-151
NUMA node3 CPU(s): 24-31,152-159
NUMA node4 CPU(s): 32-39,160-167
NUMA node5 CPU(s): 40-47,168-175
NUMA node6 CPU(s): 48-55,176-183
NUMA node7 CPU(s): 56-63,184-191
NUMA node8 CPU(s): 64-71,192-199
NUMA node9 CPU(s): 72-79,200-207
NUMA node10 CPU(s): 80-87,208-215
NUMA node11 CPU(s): 88-95,216-223
NUMA node12 CPU(s): 96-103,224-231
NUMA node13 CPU(s): 104-111,232-239
NUMA node14 CPU(s): 112-119,240-247
NUMA node15 CPU(s): 120-127,248-254
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 invpcid_single hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca
docker inspect: https://gist.github.com/Phineas/270b8c1e98f33897d6ffb1a5254ac57b
Bug be can reproduced only in non interactive environment
Run bun installation by bash -c
this will run the cmd in a non interactive sub shell
I am having this error with bun 1.0.7 with this Dockerfile
FROM oven/bun:alpine
COPY . .
RUN bun install --production --ignore-scripts
This happens for me in both interactive and non interactive environment.
bun install --ignore-scripts
works
In my case, perhaps similar to @xlc, it happens only with --production
.
(And it doesn't happen, unsurprisingly, when the install cache is already populated.)
Of course, like others have mentioned above, installing the production set only means that a different set of dependencies gets installed which could be the real issue.
Locally on my M1 Mac that works:
bun install v1.0.18 (36c316a2)
+ ts-typed-events@3.0.0
In a container running via Colima on the same system:
bun install v1.0.18 (36c316a2)
[20.69ms] migrated lockfile from package-lock.json
🚚 typescript... error: IntegrityCheckFailed extracting tarball for typescript + ts-typed-events@3.0.0
[224.00ms] done
Not sure if the typescript +
part has something to do with it?
If I first change to a temporary directory and do bun install ts-typed-events@3.0.0
(populating the install cache) and then switch back to repeat the package install, then everything works fine.
What version of Bun is running?
0.3.0
What platform is your computer?
Linux 5.15.49-linuxkit #1 SMP Tue Sep 13 07:51:46 UTC 2022 x86_64 unknown
What steps can reproduce the bug?
create a dockerfile and try to install npm pacakges inside the dockerfile:
and build it like so :
How often does it reproduce? Is there a required condition?
everytime
What is the expected behavior?
bun installs packages
What do you see instead?
Additional information
maybe the base docker image plays a role here ? are there any requirements for bun to work ?