question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No HUSKY_GIT_PARAMS not available

See original GitHub issue

Hello,

I am trying to make commitlint work with husky v5 but I am getting the following error: Error: Error: Recieved 'HUSKY_GIT_PARAMS' as value for -E | --env, but environment variable 'HUSKY_GIT_PARAMS' is not available globally

package.json "@commitlint/cli": "^11.0.0", "@commitlint/config-conventional": "^11.0.0" "husky": "^5.0.4",

commit-msg_—_impfi-frontend

thanks for the help!

UPDATE:

Fixed it with this: `# .husky/pre-commit

npx --no-install commitlint --edit $1

or

yarn commitlint --edit $1`

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
phortonssfcommented, Dec 4, 2020

Just went through this issue, you have husky v5 and need to follow the v5 conventions per the v5 docs. https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v5

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to access commit message with Husky pre-commit hook?
A pre-commit hook would not access the commit message, because the hook is triggered before the commit creation. A commit-msg hook is the ......
Read more >
@micaelomota/husky-do-not-use-me - npm
Start using @micaelomota/husky-do-not-use-me in your project by running `npm i ... There are no other projects in the npm registry using ...
Read more >
Husky - Git hooks
Modern native Git hooks made easy.
Read more >
Files changed (15) - Renovate Bot Package Diff
- Git hooks can get parameters via command-line arguments and stdin. `husky` makes them accessible via `HUSKY_GIT_PARAMS` and `HUSKY_GIT_STDIN` environment ...
Read more >
Package Diff: @commitlint/cli @ 7.5.2 .. 7.6.0
HUSKY_GIT_PARAMS ;\n\t\t}\n\t\tthrow new Error(\n\t\t\t`Received ${edit} as value for -e | --edit, but GIT_PARAMS or HUSKY_GIT_PARAMS are not available ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found