繁体   English   中英

无法在Windows上的Bash中使用Bash在VS Code中安装键入文件…

[英]Could not install typings files… in VS Code, with Bash on Ubuntu on Windows

我正在尝试在Windows的Ubuntu上将Visual Studio Code与Bash一起使用。 我在Windows上安装了VS Code,但在我的JavaScript开发工作流程中仅使用Bash。

我在Bash上安装了nodenpm (通过apt-get ),但是,为了避免重复,我在Windows上也没有nodenpm 在我的VS Code设置中,我已将集成外壳配置为使用Bash:

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

集成的shell可以正常工作,并且nodenpm都可以访问。 但是,当我在项目上启动VS Code时,会收到警告:

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

我已经尝试了以下两个设置,但都不起作用:

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

是否有可能通过Bash上安装的npm来获取VS Code来安装打字文件?

尝试在设置文件中设置“externalTerminal.windowsExec”: “bash”以将其设置为终端可执行文件,然后重新启动VS Code

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM