Skip to content

npm install -g cntx-ui@latest fails: native modules (tree-sitter-sql, sharp) missing binaries #49

@whaleen

Description

@whaleen

Description

npm install -g cntx-ui@latest (v3.1.13 on registry) produces a broken install. Native Node.js addon binaries are missing, making the CLI unusable when installed from npm. Only npm link from a local source checkout (with npm rebuild) works.

Reproduction

npm install -g cntx-ui@latest
cntx-ui version

Error 1: tree-sitter-sql

Error: Cannot find module '../../build/Release/tree_sitter_SQL_binding'
Require stack:
- .../node_modules/tree-sitter-sql/bindings/node/index.js

Error 2: sharp (if sharp is still a dependency)

Error: Cannot find module '../build/Release/sharp-darwin-x64.node'

Affected native modules

All tree-sitter grammars and sharp rely on prebuilt binaries or node-gyp compilation at install time. When published to npm and installed globally, the binary artifacts are either:

  1. Not included in the published tarball (files / .npmignore excludes build/)
  2. install / postinstall scripts that compile native addons are skipped or fail silently during global install
  3. prebuild-install (used by tree-sitter) can't locate compatible prebuilts for the user's platform

Environment

  • OS: macOS (darwin-x64)
  • Node: v22.17.1
  • npm: installed via nvm
  • cntx-ui registry version: 3.1.13
  • cntx-ui local version: 3.1.15 (works via npm link + npm rebuild)

Suggested fix

Consider one or more of:

  • Bundle prebuilds for supported platforms (darwin-x64, darwin-arm64, linux-x64) using prebuildify so binaries ship inside the npm tarball
  • Add optionalDependencies for platform-specific packages (similar to how @rollup/rollup-darwin-x64 works)
  • Verify postinstall scripts run during npm install -g by testing in CI before each publish
  • Audit .npmignore / files in package.json to ensure build/Release/ dirs are not excluded from the published package

Impact

Any user running npm install -g cntx-ui gets a completely non-functional CLI. This blocks the v1.0 public release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions