-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Troubleshoot
- Before creating an issue, please check:
https://typicode.github.io/husky/troubleshoot.html
If you're migrating from husky 4, see:
https://typicode.github.io/husky/migrate-from-v4.html
Context
Husky tries to open package.json for some reason, even though my project is not a Node project.
❯ npx husky init [13:25:55]
node:fs:555
return binding.open(
^
Error: ENOENT: no such file or directory, open 'package.json'
at Object.openSync (node:fs:555:18)
at Object.readFileSync (node:fs:439:35)
at file:///Users/vincent.tan/.npm/_npx/0d92fdd791cc1044/node_modules/husky/bin.js:12:8
at ModuleJob.run (node:internal/modules/esm/module_job:430:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:654:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: 'package.json'
}
Node.js v25.4.0Thank you!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels