我正在尝试按照官方文档在 Windows 操作系统上安装 devspace https://www.devspace.sh/docs/getting-started/installation?x0=6
通过 powershell 或 npm,它安装成功,但是当我进一步使用它时
devspace versiono
或 devspace init
它不起作用并显示如下。我还启用了 Set-ExecutionPolicy 并尝试将其设置为 Unrestricted 或 RemoteSigned。但没有帮助。
& : The term 'sh.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\user\AppData\Roaming\npm\devspace.ps1:24 char:7
+ & "sh$exe" "$basedir/node_modules/devspace/bin/devspace" $args
+ ~~~~~~~~
+ CategoryInfo : ObjectNotFound: (sh.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
这里缺少什么?或者有什么办法让它运行吗?
NPM 版本也有同样的问题。只需从 github 页面下载 .exe 版本:https://github.com/devspace-sh/devspace/releases
重命名为 devspace.exe 并运行它为我解决了这个问题。