bun icon indicating copy to clipboard operation
bun copied to clipboard

bun install takes extremely long time

Open alyiev opened this issue 1 year ago • 30 comments

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)

1373 packages installed [2419.37s] Internet connection is fine. yarn 3 took 30 sec(clean install)

Additional information

Trying to install those packages:

"dependencies": {
  "@expo-google-fonts/andika": "^0.2.3",
  "@expo/vector-icons": "^13.0.0",
  "@reduxjs/toolkit": "^1.9.5",
  "@tamagui/animations-moti": "^1.43.16",
  "@tamagui/animations-react-native": "^1.43.16",
  "@tamagui/config": "^1.43.16",
  "@tamagui/shorthands": "^1.43.16",
  "@tamagui/themes": "^1.43.16",
  "expo": "^49.0.6",
  "expo-constants": "~14.4.2",
  "expo-font": "~11.4.0",
  "expo-linking": "~5.0.2",
  "expo-location": "~16.1.0",
  "expo-random": "^13.1.1",
  "expo-router": "2.0.0",
  "expo-splash-screen": "~0.20.4",
  "expo-status-bar": "~1.6.0",
  "immer": "^10.0.2",
  "lodash-es": "^4.17.21",
  "ramda": "^0.28.0",
  "react": "18.2.0",
  "react-dom": "^18.2.0",
  "react-native": "0.72.3",
  "react-native-gesture-handler": "^2.9.0",
  "react-native-get-random-values": "~1.8.0",
  "react-native-maps": "1.7.1",
  "react-native-mmkv": "^2.10.1",
  "react-native-reanimated": "~3.3.0",
  "react-native-safe-area-context": "4.6.3",
  "react-native-screens": "~3.22.0",
  "react-native-url-polyfill": "^1.3.0",
  "react-native-web": "~0.19.6",
  "react-redux": "^8.1.1",
  "redux-persist": "^6.0.0",
  "tamagui": "^1.43.16",
  "zustand": "^4.3.6"
},
"devDependencies": {
  "@babel/core": "^7.20.0",
  "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
  "@tamagui/babel-plugin": "^1.43.16",
  "@types/lodash-es": "^4.17.7",
  "@types/ramda": "^0.28.23",
  "@types/react": "~18.2.14",
  "@types/uuid": "^9.0.1",
  "babel-plugin-transform-inline-environment-variables": "^0.4.4",
  "eslint": "^8.45.0",
  "eslint-config-airbnb-typescript-prettier": "^5.0.0",
  "eslint-import-resolver-alias": "^1.1.2",
  "eslint-plugin-import": "^2.28.0",
  "eslint-plugin-prettier": "5.0.0",
  "expo-dev-client": "^2.4.6",
  "prettier": "^3.0.0",
  "react-devtools": "^4.27.2",
  "typescript": "^5.1.3"
},

alyiev avatar Aug 08 '23 15:08 alyiev

wow 2400 seconds is insane

Jarred-Sumner avatar Aug 08 '23 15:08 Jarred-Sumner

same installing packages from a private repo took forever and failed, the installation was never complete for me after waiting for 2 hours

choopk avatar Sep 12 '23 14:09 choopk

This is likely a bug with our dns code

I'm sorry you waited two hours

Jarred-Sumner avatar Sep 12 '23 14:09 Jarred-Sumner

its a clean install. it queues up all the package and takes forever to process. But yarn install takes a min to complete image

bun version used is 1.0.0

choopk avatar Sep 13 '23 01:09 choopk

same problem with docker and bun 1.0.2 image

omega1996 avatar Sep 22 '23 10:09 omega1996

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

Screenshot 2023-09-23 at 12 23 02 PM

Brandoko avatar Sep 23 '23 16:09 Brandoko

Please leave a comment if you continue to run into this after bun upgrade --canary

Jarred-Sumner avatar Sep 30 '23 03:09 Jarred-Sumner

still slow after bun upgrade --canary image

choopk avatar Sep 30 '23 06:09 choopk

@choopk how long does it take with Yarn or npm or pnpm? If you pass bun install --no-cache does it get faster?

Jarred-Sumner avatar Sep 30 '23 07:09 Jarred-Sumner

with yarn clean install is about 49 sec. image bun install --no-cache didnt help

choopk avatar Sep 30 '23 07:09 choopk

@choopk if you do rm -rf ~/.bun/install node_modules bun.lockb in your project, does that help?

Jarred-Sumner avatar Sep 30 '23 07:09 Jarred-Sumner

sadly no.

choopk avatar Sep 30 '23 07:09 choopk

Please leave a comment if you still run into it

Jarred-Sumner avatar Oct 01 '23 06:10 Jarred-Sumner

Still running into it. For some reason it works really fast when I deploy it in Render But in local machine its taking eternity image

KnockOutEZ avatar Oct 05 '23 15:10 KnockOutEZ

Same here with bun 1.0.6, is there any update for this?

Ychop avatar Oct 19 '23 07:10 Ychop

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.

sobhanessi avatar Oct 21 '23 11:10 sobhanessi

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.

sobhanessi avatar Oct 23 '23 10:10 sobhanessi

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.

image

rafaellehmkuhl avatar Oct 24 '23 17:10 rafaellehmkuhl

Update on this: changing my DNS to 8.8.8.8 (Google) solved the problem.

rafaellehmkuhl avatar Oct 24 '23 17:10 rafaellehmkuhl

Restarting my docker daemon did i it for me...

Ychop avatar Oct 31 '23 13:10 Ychop

Ok, I believe it's the problem of BUN's servers which are currently workung ok.

sobhanessi avatar Oct 31 '23 14:10 sobhanessi

Same here with bun 1.0.16

Screenshot 2023-12-13 at 10 53 36

lukevinicius avatar Dec 13 '23 13:12 lukevinicius

For me, changing my DNS server actually resolved the problem!

m1212e avatar Dec 20 '23 13:12 m1212e

cool changing dns worked for me too, if you are using warp or some vpn and change it to normal wife network its working

swarajbachu avatar Jan 15 '24 01:01 swarajbachu

I had the same issue and changing DNS did not work. However, after restarting my mac it worked.

I am on Ventura.

evayde avatar Jan 15 '24 20:01 evayde

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

jfarcas avatar Jan 26 '24 21:01 jfarcas

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.

rizkyilhampra avatar Jan 27 '24 03:01 rizkyilhampra

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.

cisaacstern avatar Feb 01 '24 19:02 cisaacstern

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.

datsfilipe avatar Feb 03 '24 13:02 datsfilipe

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.

ImTheDeveloper avatar Feb 10 '24 16:02 ImTheDeveloper