Skip to main content

RAG Pipeline Utils v2.6.2: npm install Works Everywhere

· 3 min read
Ali Kahwaji
Creator & Maintainer of RAG Pipeline Utils

v2.6.2 fixes one bug, and it's an important one: on a machine without husky installed globally, npm install @devilsdev/rag-pipeline-utils failed. That covers most laptops and every CI runner. Every release from 2.2.1 to 2.6.1 is affected. Please upgrade:

npm install @devilsdev/rag-pipeline-utils@latest

What went wrong​

The package's package.json had this script:

"postinstall": "husky install"

husky installs the git hooks that format and lint this repository's commits. It's a development dependency, so it isn't installed when you add the package to your project. npm runs a package's postinstall script in your project, though, so the install ran a command that didn't exist and failed:

npm error command sh -c husky install
npm error sh: 1: husky: not found

On Windows the message is 'husky' is not recognized as an internal or external command.

Why it went unnoticed​

The install only worked on machines where husky happened to be installed globally, and the maintainer's machine was one of them. The test that installs the packed package as a user would runs with --ignore-scripts, so it never ran the hook.

It came to light while building the rag-eval GitHub Action. The Action's first CI run installed the library on a fresh GitHub runner and failed with husky: not found. Reproducing it against the published 2.6.1, with the global husky hidden, showed the same failure.

The fix​

2.6.2 is built from 2.6.1 with only this change, so nothing else differs. The work for 2.7.0, which adds dataset validation, configuration comparison and a rag-pipeline eval command, stays on main until its release.

  • The hook now runs from prepare. npm runs prepare when someone installs this repository's own dependencies, so contributors still get the git hooks, and never when you install the package from npm. husky's documentation recommends this setup.
  • The pack smoke test now fails if the package has a preinstall, install or postinstall script. It was checked both ways: it fails on the old script and passes on the fix.
  • The 2.6.2 tarball was installed in an empty project with no husky on the PATH. That's the setup where 2.6.1 failed; 2.6.2 installs, loads and runs the CLI.

If you can't upgrade yet​

The package needs no install scripts, so you can skip the hook:

npm install --ignore-scripts @devilsdev/rag-pipeline-utils@2.6.1

The full list of changes is in the CHANGELOG.