Skip to content

Add windows compatibility to npx simple-git-hooks when configured by .js file #38

@toplenboren

Description

@toplenboren

When setting the configuration from js file (simple-git-hooks.js or .simple-git-hooks.js)
the npx simple-git-hooks command executed on Windows 10 returns an error:

Line:       1
Char:      1
Error:      'module' is not defined
Source:  Microsoft JScript runtime error

The problem happens because for some reason Windows might use internal JS interpreter instead of node. This internal interpreter does not know what module is, thus throwing an error.

--

Possible workaround for now is to use configuration from package.json or simple-git-hooks.json files.

Also changing the default interpreter might help

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions