Skip to content

Fresh clone cannot install or build since the reshape: root tsconfig now includes graph/test fixtures (92 errors, npm install exits 2) and npm ci has no lock file #580

Description

@suyashpaliwal26

What

A fresh clone of main at 61b0ef1 cannot be installed or built with the documented commands:

step result
npm ci exits 1: EUSAGE — The npm ci command can only install with an existing package-lock.json. The lock files were removed in #476 ("lock files uncommitted").
npm install installs the dependencies, then exits 2, because the root prepare script runs npm run build.
npm run build npm run build -w parser succeeds (parser/dist/, 2,257 files). The root tsc then fails with 92 errors, all under graph/test/typescript/fixtures/.

Counted from the de-coloured build log:

error lines: 92, all in graph/test/typescript
  51 TS2307  Cannot find module '@f/shapes' | '@fixture/shapes' | '@tt/named' | '@d/handler' | …
   4 TS17004, 2 TS1241, 2 TS1270, 1 TS18048, 1 TS2532 …
graph/test/typescript/fixtures/dispatch/src/consumer.ts:1:37 - error TS2307: Cannot find module '@d/handler'
graph/test/typescript/fixtures/linking/src/link-barrel.ts:8:37 - error TS2307: Cannot find module '@tt/barrel'

Cause: a regression from the reshape

  • At 69a0383 the root tsconfig.json had "rootDir": "./src" and "include": ["src/**/*"], and the suites' fixtures lived in a top-level test/, outside the compiled root.
  • b30d3bfb ("reshape: the engine's tests move to graph/test/") and f24503a0 ("src/ becomes graph/") changed that. The root config is now "rootDir": "./graph" and "include": ["graph/**/*"], so tsc compiles every fixture under graph/test/typescript/fixtures/*/src.
  • Those fixtures are separate TypeScript programs. They import through path aliases (@d/, @tt/, @f/, @fixture/) defined only in each fixture's own tsconfig.json, and some deliberately exercise invalid code. Under the root config they cannot resolve.

The pipeline itself works despite the failed build. graph/pipeline/run-souffle.sh runs the bundle stage through node_modules/.bin/tsx whenever tsx is installed, and the parser workspace builds first. So this breaks installation and dist/, not a solve. But npm install exiting non-zero is the first thing anyone following the README sees, and bin/axiomcode's own hint ("run: npm install && npm run build") leads straight into it.

Reproduce

git clone <repo> x && cd x && git checkout 61b0ef1
npm ci             # EUSAGE, no package-lock.json
npm install; echo $?   # 2 (prepare -> build)
npm run build 2>&1 | sed $'s/\x1b\\[[0-9;]*m//g' | grep -c 'error TS'   # 92, all graph/test/typescript/fixtures

Suggested fix

  1. Add "graph/test/**" to exclude in the root tsconfig.json, or give the suites their own tsconfig. This restores the pre-reshape boundary.
  2. Either commit package-lock.json again, or change the docs and hints from npm ci to npm install.
  3. Consider making prepare build only what a consumer needs (-w parser plus the bundle), so a type error in a test fixture cannot fail installation.
  4. This is exactly what a CI gate on main would have caught (No CI gate on main: the regression suites never run before a merge, and a suite that skips itself reports success #417).

Found while running callgraph-benchmark against the latest engine from a scratch clone.

Activity

  1. swapnilpaliwal-sd commented on Sep 14, 2026

    @swapnilpaliwal-sd
    Contributor

    Valid at 61b0ef1, and fixed by the next commit on main, #477 (febf8b45), which is your suggested fix 1: the root tsconfig now has "exclude": ["node_modules", "dist", "graph/test"].

    Verified just now on a fresh clone of main at 9d10d81: npm install exits 0, 0 TypeScript errors, parser/dist/index.js and dist/bundle/cli.js present, bin/axiomcode --help runs.

    On the other points: the documented install command is npm install (README and the hint in bin/axiomcode); npm ci is not referenced anywhere, and the lock files are intentionally not committed. Point 3 is moot once the fixtures are outside the compiled root. Point 4 is #418, which now includes a fresh-clone install job for exactly this class of failure.

  2. added
    bugSomething isn't working
    buildBuild, packaging and developer setup
    on Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingbuildBuild, packaging and developer setup

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions