oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.16k stars 2.77k forks source link

Some bun commands are stuck in Windows #9865

Open tobycm opened 7 months ago

tobycm commented 7 months ago

What version of Bun is running?

1.1.0+5903a6141

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What steps can reproduce the bug?

Install bun using command from https://bun.sh

Restart computer

Open a folder with a valid package.json file

rm -r .\node_modules\
pnpm i

Works

> pnpm i

   ╭──────────────────────────────────────────────────────────────────╮
   │                                                                  │
   │                Update available! 8.15.5 → 8.15.6.                │
   │   Changelog: https://github.com/pnpm/pnpm/releases/tag/v8.15.6   │
   │         Run a script from: https://pnpm.io/installation          │
   │                                                                  │
   │      Follow @pnpmjs for updates: https://twitter.com/pnpmjs      │
   │                                                                  │
   ╰──────────────────────────────────────────────────────────────────╯

Packages: +27
+++++++++++++++++++++++++++
Progress: resolved 50, reused 27, downloaded 0, added 27, done

dependencies:
+ socket.io 4.7.5
+ tsx 4.7.1

Done in 3s
rm -r .\node_modules\
bun install

Stuck

> bun install
bun install v1.1.0 (5903a614)
  🔍 Resolving [1/2]

for a long time

And bun upgrade is also stuck,

> bun upgrade

What is the expected behavior?

bun install installs packages and bun upgrade at least returns a message that I am up to date.

What do you see instead?

> bun install
bun install v1.1.0 (5903a614)
  🔍 Resolving [1/2]
> bun upgrade

Additional information

> echo $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

package.json:

{
  "name": "trust-game",
  "version": "0.0.1",
  "description": ":))))",
  "main": "index.js",
  "scripts": {
    "start": "tsx index.ts",
    "dev": "tsx watch index.ts"
  },
  "keywords": [
    "game",
    "online",
    "websocket"
  ],
  "author": "tobycm",
  "license": "MIT",
  "dependencies": {
    "socket.io": "^4.7.5",
    "tsx": "^4.7.1"
  }
}
gvilums commented 7 months ago

Thanks for the bug report. Could you attach the package.json file you used when you encountered this issue?

tobycm commented 7 months ago

Yes, I have updated my post.

aiktb commented 7 months ago

I have the same issue. I'm using a proxy, not sure if it has anything to do with it.

My package.json: https://github.com/aiktb/FuriganaMaker/blob/main/package.json

PS C:\Users\aiktb\Github\FuriganaMaker> npx envinfo --system --binaries

  System:
    OS: Windows 11 10.0.22631
    CPU: (18) x64 Intel(R) Core(TM) Ultra 5 125H
    Memory: 9.81 GB / 31.61 GB
  Binaries:
    Node: 21.7.2 - C:\Program Files\nodejs\node.EXE
    npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
    bun: 1.1.1 - ~\AppData\Roaming\npm\bun.CMD

image

tobycm commented 7 months ago

My bun works now! I tried again today in a different network and bun i works just fine as well as bun upgrade

Leni-Vienne commented 7 months ago

Same issue on bun upgrade and bun install stuck "resolving", I am behind a proxy as well. On the same machine windows machine it :

tobycm commented 6 months ago

Hi!

The problem occurred to me again, but it takes a long time to resolve (10-15min) when I run bun i

What version of Bun is running?

1.1.7

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What steps can reproduce the bug?

Install bun using command from https://bun.sh

Open a folder with a valid package.json file

rm -r .\node_modules\
> pnpm i

   ╭──────────────────────────────────────────────────────────────────╮
   │                                                                  │
   │                Update available! 8.15.5 → 8.15.6.                │
   │   Changelog: https://github.com/pnpm/pnpm/releases/tag/v8.15.6   │
   │         Run a script from: https://pnpm.io/installation          │
   │                                                                  │
   │      Follow @pnpmjs for updates: https://twitter.com/pnpmjs      │
   │                                                                  │
   ╰──────────────────────────────────────────────────────────────────╯

Packages: +27
+++++++++++++++++++++++++++
Progress: resolved 50, reused 27, downloaded 0, added 27, done

dependencies:
+ socket.io 4.7.5
+ tsx 4.7.1

Done in 3s
rm -r .\node_modules\
bun install

Takes insanely long time to resolve and download modules

> bun i
bun install v1.1.7 (b0b7db5c)
  🔍 Resolving...

bun upgrade also takes a long time to download.

What is the expected behavior?

bun install and bun upgrade doesn't take a long time to run

What do you see instead?

> bun install
bun install v1.1.7 (b0b7db5c)
  🔍 Resolving...
> bun upgrade

Additional information

> echo $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.2
PSEdition                      Core
GitCommitId                    7.4.2
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

package.json:

{
  "name": "trust-game",
  "version": "0.0.1",
  "description": ":))))",
  "main": "index.js",
  "scripts": {
    "start": "tsx index.ts",
    "dev": "tsx watch index.ts"
  },
  "keywords": [
    "game",
    "online",
    "websocket"
  ],
  "author": "tobycm",
  "license": "MIT",
  "dependencies": {
    "socket.io": "^4.7.5",
    "tsx": "^4.7.1"
  }
}
tobycm commented 5 months ago

Hi! I think the problem is bun using the network interface that doesn't have an Internet connection. After I disable my Radmin VPN network adapter, bun works just fine

Although this problem doesn't happen on pnpm or npm when I have my Radmin VPN enable.