bun icon indicating copy to clipboard operation
bun copied to clipboard

Bun install hangs on Resolving (Waiting for 20 tasks) after already disabling IPv6

Open KtheVeg opened this issue 9 months ago • 6 comments

What version of Bun is running?

1.1.6+e58d67b46

What platform is your computer?

Linux 6.5.0-28-generic x86_64 x86_64

What steps can reproduce the bug?

Installed Bun (downloaded the script then ran separately).

  1. Created a project with bun init
  2. Ran bun i cheerio

What is the expected behavior?

Expected Resolving step to last less than a minute.

What do you see instead?

When run with --verbose, the line Waiting for 20 tasks gets printed repeatedly.

Additional information

Attempted fixes:

  1. Rebooting
  2. Updating Bun (both to Canary and Stable)
  3. Disabling IPv6 (Modified NM config for my network to disable IPv6 for this network)

KtheVeg avatar Apr 30 '24 16:04 KtheVeg

Hm, unfortunately I'm unable to reproduce this. Are there any additional details about your environment that you could share?

gvilums avatar May 01 '24 22:05 gvilums

I have similar problem (# [PackageManager] waiting for) using Docker, Bun 1.1.6

files: compose.prod.yml:

services:
  quasar-staging:
    build:
      context: .
      dockerfile: Dockerfile
      target: "production-stage"
    container_name: escape-room-ccui-staging
    ports:
      - "8080:8080"
      - "9000:9000"
    volumes:
      - ".:/app"

Dockerfile:

# build stage
FROM oven/bun:1.1 as develop-stage

# create work direction
RUN mkdir -p /usr/src/web

WORKDIR /usr/src/web

COPY . .

# build stage
FROM develop-stage as build-stage
RUN bun install --verbose
RUN bun install --verbose -g @quasar/cli

RUN bun run quasar build

# production stage
FROM nginx:1.25-alpine-slim as production-stage

COPY --from=build-stage /usr/src/web/dist/spa /usr/share/nginx/html
COPY --from=build-stage /usr/src/web/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf

EXPOSE 80

# start
CMD ["nginx", "-g", "daemon off;"]

package.json

{
  "name": "frontend",
  "version": "0.0.1",
  "description": "EscapeRoomUI CC",
  "productName": "EscaperRomCC",
  "author": "mgur <[email protected]>",
  "type": "module",
  "private": true,
  "scripts": {
    "lint": "eslint --ext .js,.vue ./",
    "format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore",
    "test": "echo \"No test specified\" && exit 0",
    "dev": "quasar dev",
    "build": "quasar build"
  },
  "dependencies": {
    "@chenfengyuan/vue-countdown": "^2.1.2",
    "@quasar/extras": "^1.16.9",
    "@sentry/tracing": "^7.106.0",
    "@sentry/vue": "^7.106.0",
    "@vueuse/core": "^10.5.0",
    "axios": "^1.6.1",
    "howler": "^2.2.4",
    "luxon": "^3.4.3",
    "pinia": "^2.1.7",
    "quasar": "^2.14.0",
    "uuid": "^9.0.1",
    "vue": "^3.4.0",
    "vue-i18n": "^9.10.0",
    "vue-router": "^4.2.0"
  },
  "devDependencies": {
    "@intlify/unplugin-vue-i18n": "^2.0.0",
    "@quasar/app-vite": "^2.0.0-beta.11",
    "@sentry/vite-plugin": "^2.14.3",
    "autoprefixer": "^10.4.2",
    "eslint": "^8.11.0",
    "eslint-config-prettier": "^9.0.0",
    "eslint-plugin-vue": "^9.0.0",
    "postcss": "^8.4.14",
    "prettier": "^3.0.3",
    "vite-plugin-checker": "^0.6.4"
  },
  "engines": {
    "node": "^24 || ^22 || ^20 || ^18",
    "npm": ">= 6.13.4",
    "yarn": ">= 1.21.1"
  }
}

Run command: docker compose -f compose.prod.yml build

image

mgurg avatar May 02 '24 11:05 mgurg

I was having the same exact problem on my Ubuntu server machine. Disabling IPv6 fixed the issue.

progranadegrinder avatar May 15 '24 09:05 progranadegrinder

I was having the same exact problem on my Ubuntu server machine. Disabling IPv6 fixed the issue.

Unfortunately, disabling IPv6 didn't help at all, as mentionned in the third point.

KtheVeg avatar May 15 '24 10:05 KtheVeg

Also on windows, disabled IPv6.

Huliiiiii avatar Jun 22 '24 10:06 Huliiiiii

Was having the same problem with Bun 1.1.17, Ubuntu Server. Disabling IPv6 fixed it for me.

burmisov avatar Jul 03 '24 12:07 burmisov

I'm blocked too with commands init, add, install

Under a firm proxy, HTTP(S)_PROXY envs are set.

Strangely, when setting a dependency manually in the package.json, bun update works and update correctly the package

Workflow example:

package.json:

{
	"name": "dfg",
	"module": "index.ts",
	"type": "module",
	"dependencies": {
	},
	"devDependencies": {
		"@types/bun": "latest"
	},
	"peerDependencies": {
		"typescript": "^5.6.3"
	}
}

It hangs, stop after 10 s

❯ timeout 10 bun add hono
bun add v1.1.30 (7996d06b)
  🔍 Resolving [1/1]

package.json is not modified. When adding manually hono:

{
	"name": "dfg",
	"module": "index.ts",
	"type": "module",
	"dependencies": {
		"hono": "4"
	},
	"devDependencies": {
		"@types/bun": "latest"
	},
	"peerDependencies": {
		"typescript": "^5.6.3"
	}
}

And after bun update:

{
	"name": "dfg",
	"module": "index.ts",
	"type": "module",
	"dependencies": {
		"hono": "^4.6.4"
	},
	"devDependencies": {
		"@types/bun": "latest"
	},
	"peerDependencies": {
		"typescript": "^5.6.3"
	}
}

the node_modules is correctly populated.

e-roux avatar Oct 11 '24 10:10 e-roux

See same error https://github.com/oven-sh/bun/issues/13256

Ivan-Baranov avatar Oct 11 '24 12:10 Ivan-Baranov

I think the hanging problem probably arises from the http_proxy variables. I managed to run the bun install command through tcp redirection (the graftcp tool) rather than setting proxy variables.

This issue may be related to the bug in Zig stdlib. https://github.com/ziglang/zig/issues/19878

xubaiwang avatar Dec 03 '24 20:12 xubaiwang

This is still happening to me. Disabling IPv6 did nothing. This seems to have been an ongoing issue for a long time now, would be good if there were a fix.

arxkdev avatar Jan 14 '25 18:01 arxkdev

This is still happening to me. Bun 1.2.2

typed-sigterm avatar Feb 10 '25 12:02 typed-sigterm

same here Bun v1.2.2 on Ubuntu 24.04

download through http_proxy

trylovetom avatar Feb 11 '25 08:02 trylovetom

after remove lockfile and reinstall, everything go fine, don't know why.

elantion avatar Feb 17 '25 00:02 elantion