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

husky breaks the intended behavior of npm install <folder> #1545

Open
thoughtsunificator opened this issue Dec 11, 2024 · 0 comments
Open

husky breaks the intended behavior of npm install <folder> #1545

thoughtsunificator opened this issue Dec 11, 2024 · 0 comments

Comments

@thoughtsunificator
Copy link

thoughtsunificator commented Dec 11, 2024

Assuming [email protected], Linux and bash.

  1. mkdir foo
  2. cd foo/
  3. npm init -y
  4. cd ..
  5. mkdir bar
  6. cd bar
  7. npm init -y
  8. cd ../foo
  9. npx husky init
  10. cd ../bar
  11. npm i ../foo

with npm i ../foo yielding:

(node:1020377) ExperimentalWarning: CommonJS module /usr/local/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /usr/local/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
npm error code 127
npm error path /tmp/husky-breaks-npm-i/foo
npm error command failed
npm error command sh -c husky
npm error sh: line 1: husky: command not found
npm error A complete log of this run can be found in: /home/user/.npm/_logs/2024-12-11T19_27_05_101Z-debug-0.log
[user@computer husky-breaks-npm-i]$ tree
.
├── bar
│   └── package.json
└── foo
    └── package.json
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

1 participant