-
Notifications
You must be signed in to change notification settings - Fork 263
Open
Labels
bugSomething isn't workingSomething isn't workingwaiting for responseWe need more details or confirmationWe need more details or confirmation
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 on 1.6.8.
I'm also not seeing any of these packages mentioned in the package lock in the node_modules folder:
"packages": {
...
"node_modules/lefthook": {
"optionalDependencies": {
"lefthook-darwin-arm64": "1.6.10",
"lefthook-darwin-x64": "1.6.10",
"lefthook-freebsd-arm64": "1.6.10",
"lefthook-freebsd-x64": "1.6.10",
"lefthook-linux-arm64": "1.6.10",
"lefthook-linux-x64": "1.6.10",
"lefthook-windows-arm64": "1.6.10",
"lefthook-windows-x64": "1.6.10"
}
}
}
Lefthook version
package.json dependency version 1.6.10. Trying to call npx lefthook version -f throws the same error mentioned below.
Steps to reproduce
- Upgrade dependency version to
1.6.10 npm i- Try to make any commit
Expected results
Successful commit
Actual results
Error: Cannot find module 'lefthook-linux-x64/bin/lefthook'
Logs / Screenshots
+ '[' '' = 0 ']'
+ call_lefthook run prepare-commit-msg .git/COMMIT_EDITMSG message
++ git rev-parse --show-toplevel
+ dir=/home/redacted
++ uname
++ tr '[:upper:]' '[:lower:]'
+ osArch=linux
++ uname -m
++ sed s/aarch64/arm64/
+ cpuArch=x86_64
+ test -n ''
+ lefthook -h
+ test -f /home/redacted/node_modules/lefthook/bin/index.js
+ /home/redacted/node_modules/lefthook/bin/index.js run prepare-commit-msg .git/COMMIT_EDITMSG message
node:internal/modules/cjs/loader:1080
throw err;
^
Error: Cannot find module 'lefthook-linux-x64/bin/lefthook'
Require stack:
- /home/redacted/node_modules/lefthook/get-exe.js
- /home/redacted/node_modules/lefthook/bin/index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Function.resolve (node:internal/modules/cjs/helpers:127:19)
at getExePath (/home/redacted/node_modules/lefthook/get-exe.js:17:18)
at Object.<anonymous> (/home/redacted/node_modules/lefthook/bin/index.js:9:5)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/redacted/node_modules/lefthook/get-exe.js',
'/home/redacted/node_modules/lefthook/bin/index.js'
]
}
Node.js v18.17.1farnaz-rashidi, flntzr, yamamotoa-lvgs, devodii, mittsmasa and 3 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingwaiting for responseWe need more details or confirmationWe need more details or confirmation