Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gen-docs hook fails to generate index #10

Open
DylanSpOddball opened this issue Jan 20, 2022 · 2 comments
Open

gen-docs hook fails to generate index #10

DylanSpOddball opened this issue Jan 20, 2022 · 2 comments

Comments

@DylanSpOddball
Copy link

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.

@DylanSpOddball
Copy link
Author

I forked this repo for testing; invoking adr-log with npx instead of trying to calculate ADR_BIN seems to do the trick. See https://github.com/DylanSpOddball/pre-commit-hooks/blob/main/pre-commit-gen-docs#L24.

@rpdelaney rpdelaney self-assigned this Jun 2, 2023
@rpdelaney
Copy link
Contributor

Hey @DylanSpOddball . Sorry for such a slow response - not sure how we missed this. I'm getting it into our backlog to look at the issue you're reporting.

@rpdelaney rpdelaney removed their assignment Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants