Skip to content

gen-docs hook fails to generate index #10

@DylanSpOddball

Description

@DylanSpOddball

We have the gen-docs hook installed in https://github.com/CMSgov/easi-app; however, the pre-commit-gen-docs bash script fails when run. Running with pre-commit run --all-files --verbose (as of CMS-Enterprise/easi-app@c8837bd) shows the following error:

Generate a Docs Index....................................................Passed
- hook id: gen-docs
- duration: 0.4s

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module '/home/dylan/.cache/pre-commit/repobdz038eu/node_modules/.bin/adr-log'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v17.3.0

The pre-commit run passes (without --verbose, it doesn't show any errors), but doesn't run adr-log to update the ADR index.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions