When installing @ui5/mcp-server@0.2.9 from the npm registry, the prepare lifecycle script fails because .husky/skip.js is not included in the published tarball:
> @ui5/mcp-server@0.2.9 prepare
> node ./.husky/skip.js || husky
Error: Cannot find module '/tmp/tmp.xxx/package/.husky/skip.js'
sh: 1: husky: not found
npm error code 127
Steps to reproduce
npm pack @ui5/mcp-server@0.2.9
mkdir test && tar xzf ui5-mcp-server-0.2.9.tgz -C test
cd test/package
npm install # fails with exit code 127
The tarball contains 282 files, none from .husky/. The prepare script references .husky/skip.js which exists in the repo but is excluded from the published package. Since husky is a devDependency, the fallback || husky also fails.
This affects any consumer that installs with lifecycle scripts enabled (e.g., Docker-based CI builds).
Suggested fixes
- Include
.husky/skip.js in the published tarball (add .husky to the files field in package.json)
- Use
pinst to disable prepare in published packages
- Guard inline:
"prepare": "test -f .husky/skip.js && node .husky/skip.js || true"
When installing
@ui5/mcp-server@0.2.9from the npm registry, thepreparelifecycle script fails because.husky/skip.jsis not included in the published tarball:Steps to reproduce
The tarball contains 282 files, none from
.husky/. Thepreparescript references.husky/skip.jswhich exists in the repo but is excluded from the published package. Sincehuskyis a devDependency, the fallback|| huskyalso fails.This affects any consumer that installs with lifecycle scripts enabled (e.g., Docker-based CI builds).
Suggested fixes
.husky/skip.jsin the published tarball (add.huskyto thefilesfield in package.json)pinstto disablepreparein published packages"prepare": "test -f .husky/skip.js && node .husky/skip.js || true"