Skip to content

bug: linux-arm64 tarball missing @anush008/tokenizers-linux-arm64-gnu native binding #3951

Closed

Description

@johrld

Summary

The published superset-linux-arm64.tar.gz (cli-v0.2.1) crashes immediately on superset start:

Error: Cannot find module '@anush008/tokenizers-linux-arm64-gnu'
Require stack:
- /opt/superset/lib/node_modules/@anush008/tokenizers/index.js

#3921 fixed this for linux-x64 by shipping the tokenizers native; the linux-arm64 target was missed.

Reproduce

On any Linux ARM64 host (Hetzner CCX-ARM/Neoverse-N1, AWS Graviton, Raspberry Pi 4/5, Oracle Ampere):

mkdir -p /opt/superset && cd /opt/superset
curl -fsSL -o /tmp/s.tar.gz https://github.com/superset-sh/superset/releases/download/cli-v0.2.1/superset-linux-arm64.tar.gz
tar xzf /tmp/s.tar.gz -C /opt/superset
SUPERSET_API_KEY=sk_live_… /opt/superset/bin/superset start

→ MODULE_NOT_FOUND for @anush008/tokenizers-linux-arm64-gnu. Host service exits before binding a port.

Root cause (three layers)

  1. Build pipeline (packages/cli/scripts/build-dist.ts, packages/host-service/build.ts): the linux-arm64 target doesn't list @anush008/tokenizers-linux-arm64-gnu. Same omission fix(cli): ship onnxruntime-node + tokenizers natives in linux-x64 tarball #3921 plugged for linux-x64.
  2. @anush008/tokenizers@0.0.0 (the pinned version in bun.lock): its optionalDependencies lists only tokenizers-darwin-universal, tokenizers-linux-x64-gnu, tokenizers-win32-x64-msvc — no arm64. So even if the build script were updated, bun install couldn't resolve the missing package.
  3. npm registry: @anush008/tokenizers-linux-arm64-gnu@0.0.0 does not exist on npm (only public versions 0.5.0 and 0.6.0 are published — confirmed via https://registry.npmjs.org/@anush008/tokenizers-linux-arm64-gnu).

So a complete fix requires all three layers.

Proposed fix

Layer 1 (this repo, ready as a diff):

diff --git a/packages/cli/scripts/build-dist.ts b/packages/cli/scripts/build-dist.ts
@@ -82,6 +82,7 @@ const TARGET_NATIVE_PACKAGES: Record<Target, string[]> = {
 	"linux-arm64": [
 		"@libsql/linux-arm64-gnu",
 		"@parcel/watcher-linux-arm64-glibc",
+		"@anush008/tokenizers-linux-arm64-gnu",
 	],
 };

diff --git a/packages/host-service/build.ts b/packages/host-service/build.ts
@@ -26,6 +26,7 @@ const result = await Bun.build({
 		"@anush008/tokenizers",
 		"@anush008/tokenizers-darwin-universal",
 		"@anush008/tokenizers-linux-x64-gnu",
+		"@anush008/tokenizers-linux-arm64-gnu",
 		"@anush008/tokenizers-win32-x64-msvc",
 	],
 });

I can open a PR with this diff as soon as layers 2+3 are unblocked. Holding it back for now since CI would fail today (bun install can't resolve the missing package).

Layer 2+3 (maintainer-side): publish @anush008/tokenizers-linux-arm64-gnu@0.0.0 to npm and republish @anush008/tokenizers@0.0.0 with that variant in optionalDependencies.

If 0.0.0 is intentionally a custom-pinned fork rather than maintained alongside the public stream, an alternative is to bump the dependency to ^0.6.0 (public release where all platform variants are properly published).

Workaround for current ARM64 users

Until the upstream fix lands, native binding can be shimmed by hand:

curl -fsSL -o /tmp/t.tgz https://registry.npmjs.org/@anush008/tokenizers-linux-arm64-gnu/-/tokenizers-linux-arm64-gnu-0.6.0.tgz
mkdir -p /opt/superset/lib/node_modules/@anush008/tokenizers-linux-arm64-gnu
tar xzf /tmp/t.tgz -C /opt/superset/lib/node_modules/@anush008/tokenizers-linux-arm64-gnu --strip-components=1

After this, superset start boots and the host registers with the relay. Verified on Hetzner CCX-ARM (Ubuntu 24.04, Neoverse-N1).

Impact

Anyone running the CLI on Hetzner ARM, AWS Graviton, Oracle Ampere, Raspberry Pi, or any aarch64 Linux host. Closely related to making the CLI usable for the headless/SSH workflow tracked in #1513.

Related

Activity

  1. added a commit that references this issue on May 1, 2026
  2. saddlepaddle commented on May 1, 2026

    @saddlepaddle
    Collaborator

    Opened #3960 with the fix. Used a slightly different shape than the diff in this issue: instead of waiting on upstream to republish $@anush008/tokenizers@0.0.0$ with arm64, I pinned $@anush008/tokenizers-linux-arm64-gnu@0.6.0$ as a direct $optionalDependency$ on $@superset/host-service$. Bun's os/cpu filtering installs it only on linux-arm64; the 0.6.0 native binary is ABI-compatible with the 0.0.0 JS loader for the fastembed surface (verified in a linux/arm64 docker container). End-to-end build + boot smoke test passes.

  3. added a commit that references this issue on May 1, 2026
    8c36fb8
  4. saddlepaddle commented on May 2, 2026

    @saddlepaddle
    Collaborator

    Release is out for 0.2.3, let me know if that fixes it!

  5. johrld commented on May 2, 2026

    @johrld
    Author

    Confirmed working on Hetzner ARM64 (Neoverse-N1, Ubuntu 24.04). Tarball v0.2.3 ships @anush008/tokenizers-linux-arm64-gnu/tokenizers.linux-arm64-gnu.node and the binding loads without MODULE_NOT_FOUND. Thanks for the quick turnaround! 🎉

  6. saddlepaddle commented on May 2, 2026

    @saddlepaddle
    Collaborator

    no problem! Let me know if you run into anything else 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions