You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when trying to run a One project using Bun runtime via this command "bun run --bun dev" (without using --bun, Bun will use Node.js implicity, that is how it's built, unfortunately). This is the output and error message:
mypc@My-Mac-mini myap % bun run --bun dev
$ one dev
Failed to find Response internal state key
⚡ Million Lint v1.0.14
✓ Ready in 0.04ms
[one] Scanning node_modules to auto-optimize...
[one] Enabled babel plugins: Reanimated
➡ [tamagui] built config and components (142ms)
[vite] connected.
Server running on ⪢
➜ Local: http://localhost:8081/
➜ Network: http://192.168.100.201:8081/
› Press ow │ open web
› Press oi │ open app in iOS Simulator
› Press oa │ open app in Android Emulator
› Press oe │ open editor
› Press qr │ show Expo Go QR code
› Press dt │ open React Native DevTools
› Press ? │ show this menu
⓵ [ssr] http://localhost:8081/ resolved to app/index.web.tsx
thread '<unnamed>' panicked at napi/src/threadsafe_function.rs:235:57:
called `Result::unwrap()` on an `Err` value: Error { status: InvalidArg, reason: "expect Function, got: Object", maybe_raw: 0x0 }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: script "dev" was terminated by signal SIGABRT (Abort)
zsh: abort bun run --bun dev
mypc@My-Mac-mini myapp %
The text was updated successfully, but these errors were encountered:
Is Bun compat with SWC? That's the only Rust I know we have in our codebase. It was working at some point too so wonder when it regressed. We should get Bun tests into CI, if you want to help with that.
— Did a bit of research with Grok, here’s the gist:
Bun Plugin with SWC: There’s a community project, bun-plugin-swc, which allows you to use SWC as a transpiler within Bun for specific use cases. For instance, as of September 2023, Bun didn’t support ‘emitDecoratorMetadata’, a TypeScript feature critical for frameworks like NestJS. The bun-plugin-swc plugin addressed this by using SWC to transpile TypeScript code and then passing it to Bun’s JavaScript loader.
Custom Workflows: You could also use SWC independently to compile your code (e.g., with @swc/core) and then run the resulting JavaScript with Bun. This is less common since Bun’s built-in transpiler is already very fast, but it’s an option if SWC’s feature set better suits your project.
Currently, when trying to run a One project using Bun runtime via this command "bun run --bun dev" (without using --bun, Bun will use Node.js implicity, that is how it's built, unfortunately). This is the output and error message:
The text was updated successfully, but these errors were encountered: