oven-sh / bun

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

bunx crash creating Svelte project #14926

Closed lawnfox14 closed 6 hours ago

lawnfox14 commented 3 weeks ago

How can we reproduce the crash?

run the command "bunx sv create testSvelte5" in a windows 11 desktop in VSCode terminal.

Relevant log output

PS C:\Users\mfmar\development> bunx sv create testSvelte5
┌  Welcome to the Svelte CLI! (v0.5.11)
│                                                                                                                  
◇  Which template would you like?
│  SvelteKit minimal
│
◇  Add type checking with Typescript?
│  Yes, using Typescript syntax
│
◆  Project created
│
◇  What would you like to add to your project? (use arrow keys / space bar)
│  prettier, tailwindcss, drizzle, lucia
│
◇  tailwindcss: Which plugins would you like to add?
│  typography, forms, container-queries, aspect-ratio
│
◇  drizzle: Which database would you like to use?
│  SQLite
│
◇  drizzle: Which SQLite client would you like to use?
│  libSQL
│
◇  lucia: Do you want to include a demo? (includes a login/register page)
│  Yes
============================================================
Bun v1.1.26 (0a37423b) Windows x64
Windows v.win10_fe
CPU: sse42 avx avx2
Args: "bun" "C:\Users\mfmar\AppData\Local\Temp\bunx-1507180283-sv@latest\node_modules\sv\dist\bin.js" "create" "testSvelte5"
Features: jsc Bun.stdin(2) Bun.stdout spawn 
Builtins: "bun:main" "node:buffer" "node:child_process" "node:events" "node:fs" "node:fs/promises" "node:module" "node:os" "node:path" "node:process" "node:readline" "node:stream" "node:stream/promises" "node:string_decoder" "node:tty" "node:url" "node:util/types" "node:zlib" 
Elapsed: 160000ms | User: 125ms | Sys: 0ms
RSS: 0.21GB | Peak: 0.24GB | Commit: 0.25GB | Faults: 99950

panic(main thread): Segmentation fault at address 0x5
oh no: Bun has crashed. This indicates a bug in Bun, not your cod

Stack Trace (bun.report)

Bun v1.1.26 (0a37423) on windows x86_64 [AutoCommand]

Segmentation fault at address 0x00000005

Sentry Issue: BUN-1Y1

github-actions[bot] commented 3 weeks ago

@lawnfox14, the latest version of Bun is v1.1.33, but this crash was reported on Bun v1.1.26.

Are you able to reproduce this crash on the latest version of Bun?

bun upgrade
nektro commented 3 weeks ago

may be a duplicate of https://github.com/oven-sh/bun/issues/10844

oluijks commented 1 week ago

Not sure what is going on but this is the error I get when creating a new project... It doesn't matter which cli options I choose...

Arch Linux
Node.js v22.11.0
Bun 1.1.34
~/Code 
> bunx sv create ******
┌  Welcome to the Svelte CLI! (v0.6.3)
│
◇  Which template would you like?
│  SvelteKit minimal
│
◇  Add type checking with Typescript?
│  Yes, using Typescript syntax
│
◆  Project created
│
◇  What would you like to add to your project? (use arrow keys / space bar)
│  prettier, eslint
│
◇  Which package manager do you want to install dependencies with?
│  bun
│
◆  Successfully setup add-ons
│
■  Failed to install dependencies
│  bun install v1.1.34 (5e5e7c60)
│  Resolving dependencies
│  Resolved, downloaded and extracted [164]
│  node:internal/child_process:1123
│      result.error = new ErrnoException(result.error, 'spawnSync ' + options.file);
│                     ^
│  
│  <ref *1> Error: spawnSync /home/***/Code/******/node_modules/esbuild/bin/esbuild EACCES
│      at Object.spawnSync (node:internal/child_process:1123:20)
│      at spawnSync (node:child_process:874:24)
│      at Object.execFileSync (node:child_process:917:15)
│      at validateBinaryVersion (/home/***/Code/*******/node_modules/esbuild/install.js:99:28)
│      at /home/***/Code/******/node_modules/esbuild/install.js:283:5 {
│    errno: -13,
│    code: 'EACCES',
│    syscall: 'spawnSync /home/***/Code/******/node_modules/esbuild/bin/esbuild',
│    path: '/home/***/Code/******/node_modules/esbuild/bin/esbuild',
│    spawnargs: [ '--version' ],
│    error: [Circular *1],
│    status: null,
│    signal: null,
│    output: null,
│    pid: 0,
│    stdout: undefined,
│    stderr: undefined
│  }
│  
│  Node.js v22.11.0
│  
│  error: postinstall script from "esbuild" exited with 1
│  
└  Operation failed.
nektro commented 1 week ago

@oluijks this issue is specific to windows, what you're seeing is https://github.com/oven-sh/bun/issues/8729

oluijks commented 1 week ago

@nektro Whoops, my apologies... Should I update 8729?

heimskr commented 6 hours ago

Fixed by #15357.