altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

fix: `npm install -g altimate-code` fails with Cannot find module '@altimateai/altimate-core'

Open anandgupta42 opened this issue 8 months ago • 0 comments

Problem

Running npm install -g altimate-code and then altimate produces:

error: Cannot find module '@altimateai/altimate-core' from '/$bunfs/root/src/index.js'

This affects v0.4.7 (latest published).

Root Cause

  1. @altimateai/altimate-core is a NAPI-RS native module. Bun's bundler inlines the JS loader but cannot embed the .node native binary. The published wrapper package doesn't declare it as a dependency, so it's never installed.

  2. @altimateai/dbt-integration was marked as external, but without code splitting Bun inlines dynamic import() targets into the main chunk — the external require() fails at startup before any try/catch can catch it.

  3. Bun compiled binaries resolve externals from /$bunfs/root/ (virtual filesystem), not from the physical binary location.

Expected

altimate --version should print the version after npm install -g altimate-code.

anandgupta42 avatar Mar 18 '26 13:03 anandgupta42