lukaszkurantdev / react-native-fast-collapsible

Pure Javascript library for React Native with super-fast collapsible component using Reanimated v3 API.
MIT License
19 stars 4 forks source link

Pre-commit hook fails with exit status 128 #1

Closed perqa closed 1 month ago

perqa commented 1 year ago

Hello, and thanks for a useful library!

I cloned the repo, and did some minor code changes. Trying to commit those changes, I get the following error message:

Lefthook v1.4.9
RUNNING HOOK: pre-commit
error replacing {files}: exit status 128
lint: (skip) error
error replacing {files}: exit status 128
types: (skip) error

SUMMARY: (SKIP EMPTY)
Lefthook v1.4.9
RUNNING HOOK: commit-msg

  EXECUTE > commitlint
The "original" argument must be of type function

exit status 1                               
SUMMARY: (done in 0.20 seconds)
🥊  commitlint
Completed with errors, see above

I have no previous experience from using Lefthook. Any ideas what I need to change to be able to run the pre-commit hook? I'm on MacOS 12.4 (Monterey).

lukaszkurantdev commented 1 year ago

Hi, It's looks like the problem not related to repository itself. What version of node do you use?

perqa commented 1 year ago

I'm using Sourcetree, and I wasn't quite sure which node version it uses, so I added a few lines of code to the pre-commit script to set a particular node version via nvm. Unfortunately, using node v18.9 results in the same error.

Now using node v18.9.0 (npm v8.19.1)
Lefthook v1.4.9
RUNNING HOOK: pre-commit
error replacing {files}: exit status 128
lint: (skip) error
error replacing {files}: exit status 128
types: (skip) error

SUMMARY: (SKIP EMPTY)
Lefthook v1.4.9
RUNNING HOOK: commit-msg

  EXECUTE > commitlint
The "original" argument must be of type function

exit status 1                               
SUMMARY: (done in 0.21 seconds)
🥊  commitlint
Completed with errors, see above
lukaszkurantdev commented 1 month ago

I know that this is old issue, but it's not related to this lib. Anyway for more details we need following command to get more details of issue in Lefthook: LEFTHOOK_VERBOSE=1 npx lefthook run pre-commit

Probably it's related to missing git upstream branch.

Closing.