8

I'm trying to use Visual Studio Code with Bash on Ubuntu on Windows. I have VS Code installed on Windows, but otherwise use Bash exclusively for my JavaScript development workflow.

I have node and npm installed on Bash (via apt-get), however, I do not have node and npm also on Windows to avoid duplication. In my VS Code settings, I have configured the integrated shell to use Bash:

"terminal.integrated.shell.windows": "C:\\windows\\Sysnative\\bash.exe"

The integrated shell works fine, and node and npm are both accessible. However, when I launch VS Code on my project, I get the warning:

Could not install typings files for JavaScript langauge features. Please ensure that NPM is installed or configure 'typescript.npm' in your user settings

I have tried both the following settings, neither of which work:

"typescript.npm": "C:\\windows\\Sysnative\\bash.exe"
"typescript.npm": "C:\\windows\\Sysnative\\bash.exe -c \"npm\""

Is it possible to get VS Code to install typings files via the npm that is installed on Bash?

heartyporridge
  • 1,151
  • 8
  • 25
  • You can find the solution here https://stackoverflow.com/questions/44450218/how-do-i-use-bash-on-ubuntu-on-windows-wsl-for-my-vs-code-terminal Check the **Node.js & NPM** section – Bharathvaj Ganesan Aug 08 '17 at 07:22
  • Guess you have Git installed on your Windows machine as well. You can try this to see if it will work: "terminal.integrated.shell.windows": "C:\\Program Files\\Git\bin\\bash.exe". But make sure bash.exe is located in that Git installation path. – ian0411 Aug 11 '17 at 16:23

1 Answers1

-1

Try setting “externalTerminal.windowsExec”: “bash” in your settings file to set it as the terminal executable and then restart VS Code

sebbzzz
  • 471
  • 4
  • 14