tarmolov / git-hooks-js

A tool to manage and run project git hooks
167 stars 30 forks source link

'.' is not recognized as an internal or external command, #36

Closed mikeumus closed 7 years ago

mikeumus commented 7 years ago
$ npm install git-hooks --save-dev

> git-hooks@1.1.7 postinstall c:\home\cis-dashboard\web-api\frontend\node_modules\git-hooks
> ./bin/git-hooks --install
> 
> '.' is not recognized as an internal or external command,
> operable program or batch file.
codebling commented 7 years ago

Is this Windows? If so, see PR #29.

Chabane commented 7 years ago

Hello @codebling

I got this error with git-hooks@1.1.8.

Windows 7

Any idea?

$ npm install --save-dev git-hooks@1.1.8

> git-hooks@1.1.8 postinstall C:\dev\source\xxxx\node_modules\git-hooks
> ./bin/git-hooks --install

'.' is not recognized as an internal or external command,
xxxx@0.0.0 C:\dev\source\xxxx
`-- (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN @angular/core@2.4.10 requires a peer of rxjs@^5.0.1 but none was installed.
npm WARN @angular/core@2.4.10 requires a peer of zone.js@^0.7.2 but none was installed.
npm WARN postcss-reporter@4.0.0 requires a peer of postcss@^6.0.0 but none was installed.
npm WARN @aviato/ci@1.1.2-1 requires a peer of codelyzer@~3.1.1 but none was installed.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\dev\\apps\\node\\node.exe" "C:\\dev\\apps\\node\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save-dev" "@aviato/ci@1.1.2-1"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! git-hooks@1.1.8 postinstall: `./bin/git-hooks --install`
npm ERR! Exit status 1
codebling commented 7 years ago

@Chabane did you check the PR I mentioned above? There are issues with git-hooks on Windows and author does not seem to have resources to test/maintain Windows compatibility, nor willing to attempt Windows compatibility on a "best effort" basis, so this will never work. You can try my fork but I am not currently maintaining it.

Chabane commented 7 years ago

Thanks @codebling for your reply :+1:

@tarmolov is it possible to merge the PR #29? Many people have this issue.

tarmolov commented 7 years ago

I have two requirements for before adding windows support:

  1. All windows specific code will be placed to a separate module. It shouldn't make development of linux version more complex. Also somebody will be ready to help to maintain this code (yep, I need maintainer for windows version).
  2. Windows version must be tested for each PR. Travis, which I use for testing and building, doesn't support Windows yet.
codebling commented 7 years ago

@tarmolov

  1. My feeling is that code should generally aim to be portable. The pull request I created was not extremely elegant and could be refactored. I never went back to do this since it seemed unlikely to be merged anyway.
  2. That's reasonable. AppVeyor seems like the Windows equivalent of Travis. Manual testing on VirtualBox or by a contributor would be a good stopgap since there has been only 1 release so far this year.

@Chabane feel free to use my fork, let me know if there are any issues.

Chabane commented 7 years ago

@tarmolov thanks for your reply :-) It's a pity. The in-house development uses Windows, mostly :-1: @codebling thanks for your help. Unfortunately, I can only use an official repository.

codebling commented 7 years ago

@Chabane anyone can upload a module to the npm repository. I can publish the fork to npm, if that helps, although it will be no more official than it is now.