-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Error: Cannot find module 'lefthook-linux-x64/bin/lefthook' on git commit after updating npm dependency to 1.6.10 #708
Comments
The same applies to a MacBook Pro with an M3 Pro on macOS Sonoma.
|
Hey! Do you skip installation of Since 1.6.8 there was nothing special added to package management. |
I am not entirely sure what happened here but after another The project in question is a monorepo using npm workspaces in combination with lerna and I suspect this has introduced some flakiness since we've seen a similar issue before. If it's relevant, it previously occurred with @alexandrulesi Do you have a similar project setup, i.e. lerna and/or npm workspaces could be to blame? |
I believe the error we're seeing here is related to this bug in the npm CLI and can be closed here. |
I've had a similar issue on Windows 10 (but with a slightly different, windows-related error message, obviously). Reverting to previous version fixed the issue. Perhaps its related to #722, about virus scanners detecting the latest lefthook as a virus. Windows Security did warn me about an issue today, which went away after reverting to the previous version of lefthook. I don't remember upgrading lefthook TODAY, when I started seeing problems, which is why I think it might be related to #722. Partial package.json below, post reversion. (I'm sure anyone reading this would already understand how to revert to an early version, but just in case...) "devDependencies": {
"lefthook": "1.6.11",
} |
build: :down_arrow: Downgraded lefthook dependency due to issues Reverted to the previous version of lefthook due to it not working. That newer version was also being detected as a virus. (See evilmartians/lefthook#722) My issue could possibly be related to this one: - evilmartians/lefthook#708
* feat: ✨ Added WSDOT logo to header * build: ➕ Added @wsdot/web-styles dependency * build: :down_arrow: Downgraded lefthook dependency due to issues Reverted to the previous version of lefthook due to it not working. That newer version was also being detected as a virus. (See evilmartians/lefthook#722) My issue could possibly be related to this one: - evilmartians/lefthook#708
Hey! Does the issue still persist with the lefthook v1.6.16? |
Just got a similar error on a macos x64 and version Cannot find module 'lefthook-darwin-x64/bin/lefthook' So I'd say yes. |
What package manager do you use? |
I had a similar issue but it was related to the upgrade of husky to 9.x https://github.com/typicode/husky/releases/tag/v9.0.1 . They deprecated the Maybe it helps others. |
I was personally using |
I resolved the above error by reinstalling node_modules since I was using pnpm, I just ran it with the |
@thoroc do you still have this issue with the latest versions of lefthook? I remember there were issues with packaging some time ago because we were trying to fix the issue for |
Doesn't work for me. |
@garrettg123 , could you share the logs? Is the issue the same as in the description? |
🔧 Summary
In an npm environment after updating lefthook to
1.6.10
package version I am no longer able to make commits on my Fedora Linux 39 Workstation machine. I don't have the issue on1.6.8
.I'm also not seeing any of these packages mentioned in the package lock in the node_modules folder:
Lefthook version
package.json dependency version
1.6.10
. Trying to callnpx lefthook version -f
throws the same error mentioned below.Steps to reproduce
1.6.10
npm i
Expected results
Successful commit
Actual results
Error: Cannot find module 'lefthook-linux-x64/bin/lefthook'
Logs / Screenshots
The text was updated successfully, but these errors were encountered: