oven-sh / bun

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

shadcn-svelte install fails on Windows 11 #12517

Closed abastardi closed 1 month ago

abastardi commented 4 months ago

How can we reproduce the crash?

On Windows 11 in Powershell, run (as per https://www.shadcn-svelte.com/docs/installation/sveltekit):

bunx shadcn-svelte@latest init

Relevant log output

shadcn-svelte  v0.10.7
│
▲  You are currently using an unsupported runtime. Only Node.js v18 or higher is officially supported. Continue at your own risk.     
│
◇  Would you like to use TypeScript? (recommended)
│  Yes
│
◇  Which style would you like to use?
│  Default
│
◇  Which base color would you like to use?
│  Slate
│
◇  Where is your global CSS file? (this file will be overwritten)
│  src\app.css
│
◇  Where is your Tailwind config located? (this file will be overwritten)
│  tailwind.config.js
│
◇  Configure the import alias for components:
│  $lib/components
│
◇  Configure the import alias for utils:
│  $lib/utils
============================================================
Bun v1.1.17 (bb66bba1) Windows x64
Args: "bun" "C:\Users\antho\AppData\Local\Temp\bunx-342976213-shadcn-svelte@latest\node_modules\shadcn-svelte\dist\index.js" "init"   
Features: jsc Bun.stdin(2) Bun.stdout fetch spawn tsconfig_paths tsconfig(2) 
Builtins: "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:console" "node:crypto" "node:events" "node:fs" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:perf_hooks" "node:process" "node:querystring" "node:readline" "node:stream" "node:string_decoder" "node:tls" "node:tty" "node:url" "node:util" "node:util/types" "node:zlib" "node:worker_threads" "node:http2" "node:diagnostics_channel" 
Elapsed: 60621ms | User: 31ms | Sys: 15ms
RSS: 0.22GB | Peak: 0.28GB | Commit: 4.59GB | Faults: 89183

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

Stack Trace (bun.report)

Bun v1.1.17 (bb66bba) on windows x86_64 [AutoCommand]

Segmentation fault at address 0x00000005

github-actions[bot] commented 4 months ago

@abastardi, the latest version of Bun is v1.1.18, but this crash was reported on Bun v1.1.17.

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

bun upgrade
abastardi commented 4 months ago

@abastardi, the latest version of Bun is v1.1.18, but this crash was reported on Bun v1.1.17.

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

bun upgrade

Yes, same exact error after upgrading bun.

Jarred-Sumner commented 4 months ago

sad

EzraWolf commented 4 months ago

Same problem here, began on Bun 1.1.17, upgraded to 1.1.18, same problem.

Ran iex "& {$(irm https://bun.sh/install.ps1)} -Version 1.1.16" on Powershell to downgrade to Bun on 1.1.16 Same problem.

Ran the exact same command but for Bun 1.1.6, same problem.

Maybe it is shadcn-svelte or Windows 10? I have never had a problem with this up until now using Windows 11 and the newer version of Bun and shadcn-svelte.

EzraWolf commented 4 months ago

Was able to get something working, these were the exact commands I used:

Installation Guide

Toolchain installed

  1. NodeJS
  2. BunJS

Project Setup

  1. Initialize a Svelte project bun create svelte@latest

    • Skeleton project
    • Use TypeScript syntax
    • Add ESLint and Prettier
  2. Install Vite 4.4.0 (?) For some reason, a plain vanilla Svelte project can't even install anymore without this. I believe this might be the big problem, but have no clue why Found here: https://stackoverflow.com/questions/77583341/cannot-find-module-rollup-rollup-win32-x64-msvc-npm-has-a-bug-related-to-optio (Top commend, the one by Toànn)

bun install vite@4.4.0

bun update (Changes occurred) bun install (No changes)

bunx @svelte-add/tailwindcss@latest

  1. Install shadcn-svelte bunx shadcn-svelte@latest init
    • Use TypeScript
    • Default style
    • Stone colour
    • src/app.css (not a typo, edited this manually from src\app.css)
    • tailwind.config.ts
    • $lib/components
    • $lib/utils

bun update (No changes) bun install (No changes)

bunx shadcn-svelte@latest add button

All successful, no errors.

WindySpoon commented 2 months ago

Tried both Windows 10 and Windows 11 on the latest version of Bun, both had the same problem. In the meantime I will have to use node until this is fixed.

nektro commented 1 month ago

duplicate of https://github.com/oven-sh/bun/issues/12208