opencommit icon indicating copy to clipboard operation
opencommit copied to clipboard

[Bug]: TTY initialization failed: uv_tty_init returned EINVAL (invalid argument)

Open imperugo opened this issue 2 years ago • 7 comments

Opencommit Version

2.2.10

Node Version

16.16.0

NPM Version

8.11.0

What OS are you seeing the problem on?

Mac

What happened?

Hi, I've just added the prepare-commit-msg hook using husky in order to run oco --no-verify.

unfortunately it doesn't seem to work, I'm getting this error

❯ git commit -m "test"
→ No staged files match any configured task.
┌  open-commit
│
◇  2 staged files:
  .github/workflows/opencommit.yml
  .husky/prepare-commit-msg
│
◇  📝 Commit message generated
│
└  Commit message:
——————————————————
chore: remove OpenCommit Github Action and add Husky prepare-commit-msg hook to run OpenCommit CLI before commit message is created
│
◇  📝 Commit message generated
│
└  ✖ TTY initialization failed: uv_tty_init returned EINVAL (invalid argument)

husky - prepare-commit-msg hook exited with code 1 (error)

Do you have any hint?

Expected Behavior

The it works

Current Behavior

Getting error

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

imperugo avatar Jun 09 '23 15:06 imperugo

Stale issue message

github-actions[bot] avatar Jul 19 '23 21:07 github-actions[bot]

Still a problem

stevemao avatar Oct 30 '23 23:10 stevemao

Any ideas on this? I have the same problem.

maxbec avatar Dec 16 '23 07:12 maxbec

Are you guys both on Windows? If so try this: https://github.com/typicode/husky/issues/850#issuecomment-774231951

I'm getting this issue in Linux though :(

scottdotau avatar Mar 15 '24 10:03 scottdotau

what are the reproduction steps? how do you add a pre-commit-msg hook via husky? could you share the simplest way for me to reproduce it pls

di-sukharev avatar Mar 18 '24 04:03 di-sukharev

I am getting this error, any help would highly be appreciated. Screenshot from 2024-05-02 16-38-03

abidssi avatar May 02 '24 11:05 abidssi

I am getting this error, any help would highly be appreciated. Screenshot from 2024-05-02 16-38-03

Try using pnpm i instead.

testeducative avatar May 03 '24 19:05 testeducative