The term '-Command' is not recognized as the name of a cmdlet

某一天,启动项目后,项目无法正常启动,报错如下 ……

报错截图

报错截图

解决方案

打开 VSCode 的设置文件(settings.json)

添加如下配置

1
2
3
4
5
{
// ....

"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe"
}

或者

1
2
3
4
5
6
7
8
9
{
"terminal.integrated.defaultProfile.windows": "C:\\Windows\\System32\\cmd.exe (migrated)",
"terminal.integrated.profiles.windows": {
"C:\\Windows\\System32\\cmd.exe (migrated)": {
"path": "C:\\Windows\\System32\\cmd.exe",
"args": []
}
}
}
-------------本文结束感谢您的阅读-------------
坚持原创技术分享,您的支持将鼓励我继续创作!
0%