oven-sh / bun

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

"bun install" in "bun/packages/bun-lambda/" fails with "failed to resolve" error #8401

Open Delta-Time opened 9 months ago

Delta-Time commented 9 months ago

What version of Bun is running?

1.0.25+a8ff7be64

What platform is your computer?

Linux 4.4.0-19041-Microsoft x86_64 x86_64

What steps can reproduce the bug?

Performing Setup in packages/bun-lambda/README.md.

What is the expected behavior?

I don't know what console screen output, i.e. execution results, I have not seen. I am hoping that the Bun runtime will be added to the AWS Lambda custom layer types.

What do you see instead?

$ git clone git@github.com:oven-sh/bun.git
Cloning into 'bun'...
remote: Enumerating objects: 122573, done.
remote: Counting objects: 100% (25433/25433), done.
remote: Compressing objects: 100% (1806/1806), done.
remote: Total 122573 (delta 24234), reused 23792 (delta 23619), pack-reused 97140
Receiving objects: 100% (122573/122573), 149.68 MiB | 3.10 MiB/s, done.
Resolving deltas: 100% (71300/71300), done.
Updating files: 100% (33197/33197), done.
$ cd bun/packages/bun-lambda
$ pwd
/home/delta/projects/bun-lambda/bun/packages/bun-lambda
$ bun install
bun install v1.0.25 (a8ff7be6)
  🔍 @oclif/plugin-plugins [6/6] 
error: ConnectionRefused downloading package manifest @oclif/plugin-plugins
error: @oclif/plugin-plugins@^3.5.0 failed to resolve

Additional information

7f8ddd commented 9 months ago

How old is your WSL installation? Your Kernel version is quite old. Current WSL2 Ubuntu is on 5.15.

Delta-Time commented 9 months ago

I am using WSL1. I have no choice but to use WSL2 because the application I use elsewhere does not work with WSL2.

The Linux kernel looks old to me too. Also, I forgot to mention that I am using Ubuntu 22.04. Could this be one of the causes?

Delta-Time commented 9 months ago

TL;DR @7f8ddd This solved my problem. Thank you very much.

-- I've made some discoveries and share them here. First, I created the same Windows PC environment on another PC. Then, using WSL1 (in the situation of this Issue), I verified that this situation could be reproduced.

Next, I migrated from WSL1 to WSL2 using this procedure. I then ran bun install and got the following status, which appears to be successful.

665 packages installed [7.60s]

As for publish, this is not done here as it can be done in a separate procedure (using the AWS console).

This solved my problem.

c.f. As far as I know, it is not specified anywhere that it does not work on Linux 4.4 (WSL1). I hope this comment helps someone else if it does. Below is the same procedure after upgrading to WSL2.

$ uname -mprs
Linux 5.15.133.1-microsoft-standard-WSL2 x86_64 x86_64

$ git clone git@github.com:oven-sh/bun.git
  # omit
$ cd bun/packages/bun-lambda

$ pwd
/home/epsilon/projects/bun-lambda/bun/packages/bun-lambda

$ bun i
bun install v1.0.25 (a8ff7be6)

 + @oclif/plugin-plugins@3.9.4 (v4.1.21 available)
 + bun-types@0.7.3
 + jszip@3.10.1
 + oclif@3.6.5
 + prettier@2.8.4
 + aws4fetch@1.0.17

 665 packages installed [7.60s]