npm is producing incorrect or undesirable behavior.
What's going wrong?The git flow
command from the file package.json
does not work.
File package.json
contains:
json
"scripts": {
"s1": "git flow release start v1",
"s2": "git flow"
},
The command npm run s1
does not work.
The command npm run s2
works correctly.
The command git flow release start v1
works correctly.
npm run s1
> wsdl-xsd-parser@1.3.1 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! wsdl-xsd-parser@1.3.1 s1: `git flow release start v1`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wsdl-xsd-parser@1.3.1 s1 script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
The text of the error sometimes changes. For some unknown reason.
npm run s1
> wsdl-xsd-parser@1.3.1 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! wsdl-xsd-parser@1.3.1 s1: git flow release start v1
npm ERR! Exit status 1
Versions:
>npm -v
6.1.0
>node -v
v8.11.3
>git --version
git version 2.18.0.windows.1