【发布时间】:2021-03-24 23:16:26
【问题描述】:
$ npm run deploy:local
> backend@0.1.0 deploy:local
> eval "`aws-auth-helper ` lerna run deploy:sandbox --stream"
'eval' is not recognized as an internal or external command,
operable program or batch file.
节点版本:
$ node --version
v15.11.0
NPM 版本:
$ npm --version
7.6.0
我正在使用 VSCode Bash 终端。它一直工作得很好,但后来我开始收到这个错误。 bash终端和javascript终端都试过了。
如果我只是在 bash 终端中键入“eval”,它就可以正常工作。通过 npm 脚本运行时不会。
【问题讨论】:
-
似乎您正在使用为批处理/cmd 中的 bash 设计的命令。 linux 的 bash 和 windows 的 batch 有很大的不同。请确保您实际使用的是后者。
-
@Socowi 我正在使用 stackoverflow.com/a/50527994/2699001 。我需要切换到其他东西吗?
-
我不知道。在 Windows 中没有预装 bash。因此,我不知道您是否可以 switch 到 bash。您可能必须先安装 WSL、git-bash、cygwin 或类似的东西。
-
目前正在使用的实际上是 git-bash,我的印象是它曾经可以正常工作
-
is not recognized as an internal or external command, operable program or batch file.是 cmd 遇到未知命令时的消息。我不知道 node.js,但你要么写一个 cmd 命令,要么以某种方式更改 node.js 的默认 shell,或者从 cmd 调用 bash
标签: node.js bash npm visual-studio-code eval