-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Common checks and fixes:
- I don't see
.coderootfiles in the repository: the extension hides.coderootfrom the file explorer by settingfiles.exclude. UseCodeRoot: Toggle .coderoot visibilityor show hidden files to inspect. -
generateReportfails with "assets/ci-reporter.mjs not found": ensureassets/ci-reporter.mjsexists in the repository and thatassets/ci-reporter.mjsis reachable from the extension context (the reporter resolution attempts a few candidate paths). -
init-wiki.jsESM errors: the repositorypackage.jsonis ESM (type: module) — ensure scripts are run withnode(v16+) and that the script is executed as ESM. - Publishing wiki fails to push: confirm
originremote points to GitHub and your environment has push credentials; use--remote <name>to select a different remote.
If you need help, open a discussion or issue using the repository templates.
Top issues (symptom → quick fix)
-
Symptom:
generateReportfails with "assets/ci-reporter.mjs not found".Fix: Ensure
assets/ci-reporter.mjsexists and is readable. Verify extension context or run the reporter directly withnode assets/ci-reporter.mjs(may requirenodeESM invocation). -
Symptom:
init-wiki.jsESM error (require is not defined).Fix: Run the script with Node (v16+) in this ESM repo:
node scripts/init-wiki.js --docs docs/wiki --dry-run. -
Symptom: Dry-run lists files but push fails due to permissions.
Fix: Confirm
git remote -vand thatoriginpoints to the expected repo; ensure your SSH key or credential manager is set up. -
Symptom: Snapshots show empty spans or wrong totals.
Fix: Ensure your workspace
workspace_saltwas not changed after journal writes. Runnpm run force:snapshotsto rebuild (developer caution). -
Symptom: Identity consolidation misses expected mappings.
Fix: Run
CodeRoot: Consolidate Identities Nowand thenCodeRoot: Generate Reportto surface mapping changes. -
Symptom: Auto-commit does not run unexpectedly.
Fix: Auto-commit is disabled by default. Check
coderoot.autoCommit.enabledin workspace settings and ensure journaling is enabled and workspace initialized. -
Symptom: Linter/validate scripts fail locally.
Fix: Run
npm installand ensure Node.js version matches project requirements; runnpm run lintand fix the reported issues. -
Symptom: Reported totals differ from local expectations.
Fix: Inspect
.coderoot/v1/snapshots/<file>.pcm.jsonand cross-checklines_by_originandchars_by_origin. Remember snapshots may scale distributions to match accurate file bytes when available. -
Symptom: CLI scripts fail with path errors on Windows.
Fix: Tools expect ESM-safe imports; ensure scripts use
file:///pathToFileURL when dynamically importing local modules. Use the provided scripts which handle Windows paths. -
Symptom: Unexpected schema version warnings.
Fix: Mixed historical journal versions can be tolerated. Consider running migration tools (
migrateLegacyPCM) in dry-run first.
When to file an issue
- If you find a deterministic mismatch between snapshot totals and file contents after rebuilding.
- If a reporter crash includes an error message you can't interpret.
How to verify fixes
- Re-run the failing command with
--dry-runwhen available or check the extension Output channel. - Collect the failing commands, output, and a short reproduction case and open an issue using
.github/ISSUE_TEMPLATE.