A
A
asmodeus13th2021-08-09 13:40:27
npm
asmodeus13th, 2021-08-09 13:40:27

Why am I getting a husky: command not found error?

I downloaded a project that has husky . The doc says that after npm installyou need to execute husky install. When executing the last code, I get an error in the terminal husky: command not found. Before downloading the project, I installed husky globally using the npm i -g husky.
Working on Linux Ubuntu 21.04 .
The version of husky in the project is ^7.0.1 .
The version of Node.js in the project and mine is 16.3.0 .
In package.json:

"husky": {
    "hooks": {
      "pre-commit": "lint-staged",
      "pre-push": ""
    }
  },

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-08-09
@asmodeus13th

Try calling it via npx
npx husky install

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question