bun icon indicating copy to clipboard operation
bun copied to clipboard

ConnectionRefused: Cannot create app offline or under corporate proxy / firewall

Open polRk opened this issue 11 months ago • 4 comments

What version of Bun is running?

1.0.2+37edd5a6e389265738e89265bcbdf2999cb81a49

What platform is your computer?

Darwin 22.6.0 arm64 arm

What steps can reproduce the bug?

Run bun create elysia hi-elysia

What is the expected behavior?

Fetching package.json....

What do you see instead?

Install offline or support private/proxy npm registry (for example nexus)

Additional information

All Internet resources except corporate ones are closed

polRk avatar Sep 19 '23 06:09 polRk


error: ConnectionRefused

----- bun meta -----
Bun v1.0.2 (37edd5a6) Linux x64 #1 SMP Thu May 18 10:27:05 EDT 2023
CreateCommand: 
Elapsed: 130615ms | User: 4ms | Sys: 4ms
RSS: 36.71MB | Peak: 16.67MB | Commit: 36.71MB | Faults: 0
----- bun meta -----

0   0x55b0879d958b
1   ???
2   ???
3   ???
4   ???
5   ???

Search GitHub issues https://bun.sh/issues or ask for #help in https://bun.sh/discord

polRk avatar Sep 19 '23 06:09 polRk

I have this same issue

gildembergleite avatar Sep 27 '23 13:09 gildembergleite

Hey, similar thing (can't install dependencies, ConnectionRefused downloading package manifest) on personal VPN. Works fine with it disabled, works fine with npm, yarn, and pnpm, and same issue regardless of IPv4-only or v6-enhanced tunneling.

coopbri avatar Dec 22 '23 06:12 coopbri

I have the same error and I'm using my regular internet, no vpn, proxy, etc. My OS is Ubuntu 23.10

kikindb avatar Jan 22 '24 23:01 kikindb

@polRk I think the nature of this issue described in bug #11582 and should be fixed in next release.

anru avatar Jun 07 '24 13:06 anru

@anru can you run bun upgrade --canary and verify the issues you’ve been running into are fixed? We’ll do the release later today

Jarred-Sumner avatar Jun 07 '24 14:06 Jarred-Sumner

@Jarred-Sumner Yes, I do confirm that version 1.1.13-canary.1 does not have the above issues (including success result for bun create elysia hi-elysia command).

Although I did encounter a new problem when trying to install packages in one of the repositories, but it may have other causes:

❯ bun add -g [email protected]
bun add v1.1.13-canary.1 (386bc212)

installed [email protected]

[1011.00ms] done

❯ bun install
bun install v1.1.13-canary.1 (386bc212)
error: [email protected] failed to resolve

This seems a bit odd - the package is installed globally, but cannot be resolved when installed as a project dependency (this dependency is not direct in package.json). After that I removed the installation caches: rm -rf ~/.bun/install/cache and ran the command again: after that the error above is gone.

Ok, I ran the command again, and ended up getting the following error:

image

Looks like bun don't link all binaries before trying run package installation scripts.

Oookay. I ran bun install again.

❯ bun install
bun install v1.1.13-canary.1 (386bc212)

255 packages installed [5.16s]
❯ echo $?
0

And finally, it works!

anru avatar Jun 07 '24 16:06 anru