-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaks when used in ES Modules context due to requirement for file name extension #394
Comments
brady-ds
added a commit
to brady-ds/ghooks
that referenced
this issue
Apr 27, 2023
Add a `package.json` to `…/.git/hooks/` to force hooks to run as CommonJS, not modules. Fixes ghooks-org#394.
brady-ds
added a commit
to brady-ds/ghooks
that referenced
this issue
Apr 27, 2023
Add a `package.json` to `…/.git/hooks/` to force hooks to run as CommonJS, not modules. Fixes ghooks-org#394.
brady-ds
added a commit
to brady-ds/ghooks
that referenced
this issue
Apr 27, 2023
Add a `package.json` to `…/.git/hooks/` to force hooks to run as CommonJS, not modules. Fixes ghooks-org#394.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment: Node 16.13.1 on Windows.
On a project where I have
"type": "module"
in mypackage.json
, the hooks fail with this error:When type is "module", the file with the shebang requires a file name extension (according to this answer on StackOverflow). That's obviously incompatible with Git's requirement for hooks not to have a file name extension. I'm not sure if there's a solution to that.
The text was updated successfully, but these errors were encountered: