Answer the question
In order to leave comments, you need to log in
How to fix `git flow` command run from `package.json` file in NPM?
The `git flow` command written in the scripts of the `package.json` file does not work.
The `package.json` file contains:
"scripts": {
"s1": "git flow release start v1",
"s2": "git flow"
},
npm run s1
> [email protected] s1 C:\temp\temp2\wsdl-xsd-parser
> git flow release start v1
git: 'flow' is not a git command. See 'git --help'.
The most similar commands are
reflog
show
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] s1: `git flow release start v1`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] s1 script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm run s1
> [email protected] s1 C:\temp\temp2\wsdl-xsd-parser
> git flow release start v1
C:\Program Files\Git\usr\bin\git-flow: line 47: uname: command not found
C:\Program Files\Git\usr\bin\git-flow: line 76: sed: command not found
C:\Program Files\Git\usr\bin\git-flow: line 76: dirname: command not found
C:\Program Files\Git\usr\bin\git-flow: line 115: /gitflow-shFlags: No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] s1: git flow release start v1
npm ERR! Exit status 1
Answer the question
In order to leave comments, you need to log in
In the end, the problem was solved like this.
I added the path C:\Program Files\Git\usr\bin to PATH
and it started working...
and who is to blame? NPM or GIT???
And notice! Gitflow commands work without NPM
https://github.com/npm/npm/issues/21152
https://stackoverflow.com/questions/51185797/how-t...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question