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

npm install fails when using npm version 10.4.0 #1531

Open
kjots opened this issue Feb 5, 2024 · 1 comment
Open

npm install fails when using npm version 10.4.0 #1531

kjots opened this issue Feb 5, 2024 · 1 comment

Comments

@kjots
Copy link

kjots commented Feb 5, 2024

Installation fails when installing with npm version 10.4.0. The npm install command runs the postinstall script, which attempts to run husky but fails as this is not listed as a package dependency. This does not occur when using npm version 10.3.0.

Output when using npm 10.3.0:

$ npm --version
10.3.0
$ npm install didyoumean2@6.0.1

added 5 packages, and audited 6 packages in 3s

found 0 vulnerabilities

Output when using npm 10.4.0:

$ npm --version
10.4.0
$ npm install didyoumean2@6.0.1
npm ERR! code 127
npm ERR! path /home/kjots/Development/Projects/didyoumean2-postinstall-issue/node_modules/didyoumean2
npm ERR! command failed
npm ERR! command sh -c husky install
npm ERR! sh: 1: husky: not found
@foray1010
Copy link
Owner

I think it is a bug from npm side. If you look into the package.json in build, the postinstall script has a _ prefix which should not run.

"_postinstall": "husky install",

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