I had the known issue of python freezing in Git bash on windows. Many answers on stackoverflow suggested to use WinPTY.
Which works fine when I use:
winpty python foo.py
But I run a python program as part of a npm script. My package.json has this:
"scripts": {
"start": "python foo.py && something else"
}
So I figure I will need to run npm script with WinPTY too:
winpty npm start
But this is not working. I got different error messages on different environments.
- I got "Not found in PATH" at work which has latest git and npm installed, but it is in PATH:
winpty: error: cannot start 'npm': Not found in PATH
- I got a different error at my personal computer with a slightly older git:
Error 0x2 starting npm start
Any ideas why npm and winpty isn't working together?
If I run npm start
without winpty it works fine. winpty node
works too.