1

I am trying to run below command on my existing repo which has registry setup in the .npmrc

bun install -y

The -y flag is for generating yarn v1 lockfile

It result into following error:

SegmentationFault at 188

How to setup the .rc file for bun to pickup?

Akshay Gundewar
  • 864
  • 11
  • 30
  • have you checked bun github for issues ... like https://github.com/oven-sh/bun/issues?q=is%3Aissue+is%3Aopen+188 – Jaromanda X Jul 12 '22 at 06:09
  • yes, no mention about reading registry file – Akshay Gundewar Jul 12 '22 at 06:46
  • What were the causes of the reported issues? What makes you think `error: SegmentationFault at 188` has anything to do with "reading registry file"? – Jaromanda X Jul 12 '22 at 06:48
  • My project references to private npm registry (behind a proxy) – Akshay Gundewar Jul 12 '22 at 06:50
  • 1
    Very interesting - in the issues that you just read, what was the cause of `SegmentationFault at 188` - hint: one person said something about a proxy! Seems `bun` is too immature to handle anything but direct connections – Jaromanda X Jul 12 '22 at 06:51
  • 1
    https://github.com/oven-sh/bun/issues/565 - looks like someone is working on the issue of adding packages behind a proxy - the solution now is to *wait*, as this issue was raised a day ago – Jaromanda X Jul 12 '22 at 06:53
  • From what I can gather, isn't Bun `node_modules` resolution compatible with NPM, if so could you just use NPM / PNPM for now until it's fixed. I was thinking of giving Bun a try, but not having symlinked node_modules like PNPM, and workspace not yet done. I was thinking of just using PNPM & Bun together.. – Keith Jul 12 '22 at 09:44
  • I have the exact same issue and I am indeed behind a proxy. It may also be related to SSL/TLS misconfiguration. ``` GET /@types/serve-index [0m[36mIf-None-Match[0m[2m: [0m"9ad5f009b7a096fe1e7f7a00d74863b0" [0m[36mAccept[0m[2m: [0mapplication/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */* [0m[36mConnection[0m[2m: [0mclose [0m[36mUser-Agent[0m[2m: [0mbun.js 0.1.4 [0m[36mHost[0m[2m: [0mregistry.npmjs.org [0m[36mAccept-Encoding[0m[2m: [0mdeflate, gzip SegmentationFault at 188 ``` – Charaf Jul 18 '22 at 23:24

1 Answers1

1

Bun is still in alpha. Bugs like this would happen. Solution is to use another runtime like Nodejs, or Deno; or just wait for devs to solve this issue.