Closed alyiev closed 1 week ago
wow 2400 seconds is insane
same installing packages from a private repo took forever and failed, the installation was never complete for me after waiting for 2 hours
This is likely a bug with our dns code
I'm sorry you waited two hours
its a clean install. it queues up all the package and takes forever to process. But yarn install takes a min to complete
bun version used is 1.0.0
same problem with docker and bun 1.0.2
Also had this issue on bun 1.0.0. Took 76.18s to install async-retry on MacOS 13.6.
bun add -d @types/async-retry
Please leave a comment if you continue to run into this after bun upgrade --canary
still slow after bun upgrade --canary
@choopk how long does it take with Yarn or npm or pnpm? If you pass bun install --no-cache
does it get faster?
with yarn clean install is about 49 sec. bun install --no-cache didnt help
@choopk if you do rm -rf ~/.bun/install node_modules bun.lockb
in your project, does that help?
sadly no.
Please leave a comment if you still run into it
Still running into it. For some reason it works really fast when I deploy it in Render But in local machine its taking eternity
Same here with bun 1.0.6, is there any update for this?
I can also confirm that I have the same issue by running bun create next-app and it never ended! not sure whether it is from host or the bun's bug but I hope it gets fixed as soon as possible since we want to contribute to this project. thanks.
alright one update, I tried with bunx create-next-app it worked and it was usual but not faster than yarn!
but I can confirm that bun update
also is very slow in nextjs application to update packages. it's been running for more than an hour at the time of writing. hope to get fixed as soon as possible.
Can confirm the same behavior here on 1.0.2
. Upgraded to 1.0.7
but the issue persists.
The internet connection here is fine and yarn took less than a minute to install all.
Update on this: changing my DNS to 8.8.8.8
(Google) solved the problem.
Restarting my docker daemon did i it for me...
Ok, I believe it's the problem of BUN's servers which are currently workung ok.
Same here with bun 1.0.16
For me, changing my DNS server actually resolved the problem!
cool changing dns worked for me too, if you are using warp or some vpn and change it to normal wife network its working
I had the same issue and changing DNS did not work. However, after restarting my mac it worked.
I am on Ventura.
I had the same issue and changing DNS did not work. This solution work for me. https://github.com/oven-sh/bun/issues/4938#issuecomment-1720172113 I'm on Ubuntu
I had the same issue when I first installed bun 1.0.25
. I just saw the text "resolving" for about a minute until I killed it. Reconnecting my network fixed it.
Adding that I also hit a very slow build with bun 1.0.25
. As suggested above, bun install --upgrade canary
resolved this for me.
I had the same issue and changing DNS did not work. This solution work for me. #4938 (comment) I'm on Ubuntu
Disabling ipv6 here on NixOS worked for me too.
Adding that I also hit a very slow build with bun
1.0.25
. As suggested above,bun install --upgrade canary
resolved this for me.
Just hit this very issue on docker build also. Canary indeed was the fix for me too.
Having this issue again on Bun version 1.0.27 - Nil improvement with bun install --upgrade canary
, changing DNS on /etc/netplan/01-network-manager-all.yaml
to [8.8.8.8, 8.8.4.4]
, nor disabling ipv6 per https://github.com/oven-sh/bun/issues/4938#issuecomment-1720172113 . Nil improvement with reconnecting to my network either. Running on Ubuntu.
still running into issues with bun install --upgrade canary
when using ubuntu-latest in CI.
One thing of note, the self-hosted action runner is running in a docker container on a mac m1 wired over a privacy VPN.
This makes docker builds seize up in CI/CD what is going on here?
The bug for me seemed to be related to IPV6, this temporary workaround worked for me on Arch:
uncomment precedence ::ffff:0:0/96 100
in /etc/gai.conf
Although ideally this bug should get triaged soon. There may be many users experiencing this without reporting.
ref: https://github.com/oven-sh/bun/issues/4988#issuecomment-1752328956
I was able to get consistent builds by turning off postinstall scripts in my dockerfile.
If you turn on verbose mode you might see that the build usually times out or gets stuck on a script
RUN bun install --ignore-scripts --production
+1 bun i is really slow and often stuck on resolving for minutes
Installing zod, taking 5 mins so far
Edit: Can confirm that restarting my mac fixed it...
Just installed bun 1.0.35
on my WSL 2, tried creating a Next App with bunx create-next-app@latest .
and it is taking over 2.5 hours and still not done, as I'm currently typing. Showed that it is installing over a thousand packages/dependencies/things. I mean how is that even possible?
This happened to me, always blamed it on my network. Turns out 8.8.8.8 /did/ help solve it.
Using 1.1.1.1 it was just never getting through the resolve
step. With 8.8.8.8 I could install >1000 packages (thanks javascript) in some seconds.
This is a bug that has had many causes
I think the remaining cause is our lack of IPv6 happy eyeballs support. Some domains only support IPv6 or only support IPv4. When getaddrinfo
gets this wrong, then it means connections to those domains timeout, causing bun install
to take a very long time to install. Since bun install
internally uses the same HTTP client as bun's runtime, this issue also impacts fetch
Just tested Bun v1.1 on MacOS Sonoma. Initially I saw the bun install
hang but it resolved itself after a restart.
In https://github.com/oven-sh/bun/pull/10037, I fixed a deadlock that could in theory occur if many packages took awhile to download, and then all of them finished extracting at once at just the right time before the main thread goes to sleep.
This wouldn't help if the cause is IPv6 (happy eyeballs), but if it was due to this deadlock it would fix it.
So please leave a comment if you continue to run into this after Bun v1.1.3
@Jarred-Sumner using bun 1.1.4 on a Dockerfile still takes forever to install and it's stuck here: (tasks were 3 before i take the screenshot)
FROM base AS install
RUN mkdir -p /temp/dev
COPY package.json bun.lockb /temp/dev/
RUN cd /temp/dev && bun install --frozen-lockfile
# install with --production (exclude devDependencies)
RUN mkdir -p /temp/prod
COPY package.json bun.lockb /temp/prod/
RUN cd /temp/prod && bun install --frozen-lockfile --production
if I change this line: RUN cd /temp/dev && bun install --frozen-lockfile
to RUN cd /temp/dev && bun install --frozen-lockfile --production
install time drops back to normal.
edit: my dev deps:
Still regularly encountering exceptionally slow installs in docker container. Almost always the install runs for pretty exactly 300 seconds plus a few. To me this looks like a 5 minute timeout that it reliably runs into.
Just did a fresh build
[+] Building 311.1s (9/9) FINISHED docker:default
=> [app internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 366B 0.0s
=> [app internal] load metadata for docker.io/oven/bun:1.1.4 1.7s
=> [app internal] load .dockerignore 0.1s
=> => transferring context: 74B 0.0s
=> [app base 1/3] FROM docker.io/oven/bun:1.1.4@sha256:ea572eace71acadb17ea5c408550eafd5ab82f2f6f48c04b906a3091e017cf35 0.0s
=> [app internal] load build context 0.1s
=> => transferring context: 323.06kB 0.0s
=> CACHED [app base 2/3] WORKDIR /usr/src/app 0.0s
=> [app base 3/3] COPY package.json bun.lockb ./ 0.2s
=> [app dev 1/1] RUN bun i --frozen-lockfile 305.4s
=> [app] exporting to image 3.1s
=> => exporting layers 3.0s
=> => writing image sha256:121438b6f47052001fa692753430f3335057762e7b6deadc243cae13ff902157 0.0s
=> => naming to docker.io/library/cannahub-backend-app 0.0s
using a plain dockerfile
FROM oven/bun:1.1.4 as base
WORKDIR /usr/src/app
COPY package.json bun.lockb ./
FROM base as dev
RUN bun i --frozen-lockfile
COPY . .
CMD ["bun", "start:dev"]
for CI/CD this is unbearable
Hello, I'm experiencing the same thing (nuxt project)
FROM oven/bun:canary
WORKDIR /usr/src/app
COPY package.json bun.lockb ./
RUN bun install --frozen-lockfile --production --no-cache
COPY . .
RUN bun test && bun run build || true
USER bun
EXPOSE 3000
CMD ["bun", "run", "server/index.mjs"]
Can someone reopen the issue please?
Encountered the same issue today on macOS Sonoma 14.5 and Docker Engine v26.1.1. Trying to dockerize a Nuxt3 project using a Dockerfile took over 20 minutes.
FROM oven/bun
WORKDIR /app
COPY package.json bun.lockb* ./
RUN bun install
COPY . .
RUN bun run build
EXPOSE 3000
CMD ["bun", "run", "dev"]
Adding the flag bun install --ignore-scripts
made it work.
Also getting very long install times here. Not even a docker container.
See details for dependencies
Took first 6 mins. Den ran bun upgrade --canary
and now it took 3 mins. npm used 20secs.
Same for me sadly when running this simple command bun create expo webapp
under MacOS Sonoma. The first steps takes several minutes already and I didn't make it past step 6 which by then already took around 15-20mins.
Interestingly upgrading to the canary version bun upgrade --canary
and restarting the mac also helped with my issue and now it's blazingly fast again!
"bun install" on this project took 10 hours for me before I gave up: https://github.com/am32-firmware ubuntu 22.04, node 20.15.1, bun 1.1.20
Confirming this still appears to be an issue.
Running bun install --frozen-lockfile --production in my dockerfile takes over 4 minutes to complete.
Running bun 1.1.21 on macOS arm64.
+1 still relevant, using oven/bun:1.1.24-alpine
What platform is your computer?
Darwin 22.6.0 arm64 arm
How did you attempt to install or upgrade?
bun install
What do you see instead?
bun install bun install v0.7.3 (a9b3d583)
zustand@4.4.1
1373 packages installed [2419.37s] Internet connection is fine. yarn 3 took 30 sec(clean install)
Additional information
Trying to install those packages: