editor icon indicating copy to clipboard operation
editor copied to clipboard

Unable to run the editor

Open neavns opened this issue 7 months ago • 4 comments

What happened?

Two separate issues (one kinda solvable)

Issue 1 (sovable)


CPU doesn't support the bmi2 instructions
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'tokio-runtime-worker' (4257716) panicked at /Users/geist/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/qfilter-0.3.0-alpha.2/src/lib.rs:709:9:
CPU doesn't support the bmi2 instructions

How to solve:

Upgrade next to version 16.2.2

Issue 2

This issue appears after issue 1 is fixed as described above

[browser] ./node_modules/.bun/[email protected]+6daf163ba992ca5d/node_modules/geist/dist/geistpixeltriangle_d08a9537.module.css
Error evaluating Node.js code
Error: Cannot find module '../lightningcss.darwin-x64.node'

...

Import trace:
  Server Component:
    ./node_modules/.bun/[email protected]+6daf163ba992ca5d/node_modules/geist/dist/geistpixeltriangle_d08a9537.module.css
    ./node_modules/.bun/[email protected]+6daf163ba992ca5d/node_modules/geist/dist/geistpixeltriangle_d08a9537.js
    ./node_modules/.bun/[email protected]+6daf163ba992ca5d/node_modules/geist/dist/pixel.js
    ./apps/editor/app/layout.tsx 

System

Macbook M1 Pro MacOS 26.3.1

Steps to reproduce

  1. bun install
  2. bun dev (from root, not using rosseta)

Expected behavior

Editor is working

Browser & OS

macOS 26.3.1

Screenshots or screen recordings

Image

Additional context

Tried installing lightningcss dependency, but no luck

neavns avatar Apr 16 '26 19:04 neavns

Thanks, this is a very helpful report.

On M1, can you first make sure Bun and your shell are both running native arm64, not a mixed Rosetta / x64 setup. Then try a clean reinstall, remove .next + node_modules, run bun install again, and rerun bun dev.

If you still hit the lightningcss.darwin-x64.node error after that, please paste uname -m, your Bun version, and whether your terminal is running under Rosetta.

The qfilter BMI2 issue looks related to the current dependency stack on Apple Silicon, so I will also look into that on our side.

open-pascal avatar Apr 17 '26 04:04 open-pascal

> uname -m
arm64

> bun -v
1.3.12

On next: 16.2.1 I'm only getting CPU doesn't support the bmi2 instructions:

thread 'tokio-runtime-worker' (4480674) panicked at /Users/geist/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/qfilter-0.3.0-alpha.2/src/lib.rs:709:9:
CPU doesn't support the bmi2 instructions
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'tokio-runtime-worker' (4480671) panicked at /Users/geist/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/qfilter-0.3.0-alpha.2/src/lib.rs:709:9:
CPU doesn't support the bmi2 instructions

On next: 16.2.2 I'm getting the issue with lightningcss:

browser] ./node_modules/.bun/[email protected]+baa11bb60f06894e/node_modules/geist/dist/geistpixeltriangle_d08a9537.module.css
Error evaluating Node.js code
Error: Cannot find module '../lightningcss.darwin-x64.node'

Both cases executed after a fresh install

neavns avatar Apr 17 '26 17:04 neavns

Thanks, this narrows it down a lot.

This does not look like Geist itself so much as two separate upstream issues:

  • The qfilter / CPU doesn't support the bmi2 instructions panic on next: 16.2.1 matches the known Next/Turbopack regression that was fixed in 16.2.2: https://github.com/vercel/next.js/issues/91708
  • The Cannot find module ../lightningcss.darwin-x64.node error on Apple Silicon looks like the Bun + Lightning CSS architecture-selection issue, where Bun can incorrectly resolve the x64 native module on arm64 Macs: https://github.com/parcel-bundler/lightningcss/issues/999

A couple things to try, in order:

  1. Keep next at 16.2.2
  2. Start dev with bun --bun run dev instead of bun run dev
  3. If that still fails, please paste:
    • bun -e 'console.log(process.platform, process.arch)'\n - file "$(which bun)"\n\nIf bun --bun run dev fixes it, that strongly points to the Bun/native-binary resolution issue rather than anything specific to Geist. The Geist CSS path in the stack is likely just the first CSS import that trips the Lightning CSS native binding.

open-pascal avatar Apr 17 '26 19:04 open-pascal

Awesome! Running the editor with this command on Next 16.2.2 has fixed the issue 🚀

> bun --bun run dev

Thanks for your support!

neavns avatar Apr 17 '26 19:04 neavns