"bash is not recognized" Visual Studio Code
nicoproject opened this issue · 6 comments
Same problem.But npx ts-migrate-full <folder>
can work.
I don't have a Windows system to test on, so I'll have to ask for more information.
Could it be that you're in a Bash shell, but there is no bash
on your PATH
? It would be unusual, but I guess not impossible.
What does the command which bash
print? Does the command /usr/bin/env bash
work?
Also, would it be possible to get the exact error message in English? Sorry, I am more familiar with English error messages and they are easier to Google.
When you check the files in ./node-modules/ts-migrate/bin
it's only .sh
files so not for windows users.
My understanding of the original issue is that Bash is available on the system, but for some reason is not able to run the script.
It might be a good idea to rewrite ts-migrate-full
using JavaScript, which would probably solve for both issues.
Same problem for me.
Please let me know if you need more info.
> npm install --save-dev ts-migrate
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
added 255 packages, removed 1289 packages, and audited 1299 packages in 34s
101 packages are looking for funding
run `npm fund` for details
9 moderate severity vulnerabilities
To address all issues, run:
npm audit fix
Run `npm audit` for details.
> npx -p ts-migrate -c "ts-migrate-full ./"
'"bash"' is not recognized as an internal or external command,
operable program or batch file.
> which bash
(no output)
> which this-does-not-exist
(no output)
> which node
C:\Program Files\nodejs\node.EXE
> systeminfo
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.19042 N/A Build 19042
...
Hello. I think this is not a problem of ts-config.
In theory, by installing some console with bash (like gitbash) it should work, but in my case, it didn't.
So I leave you with a way to install in Windows so it could work with Command Prompt
Please check https://stackoverflow.com/questions/36352627/how-to-enable-bash-in-windows-10-developer-preview
Cheers.