在我的新机器(Windows 10)上运行 NPM 命令,如 npm start
我没有看到以前那么多的反馈。
我想这是我缺少的进度指示器。通常看起来什么都没有发生,没有反馈。
尤其是在安装模块的时候,看起来真的是东西挂了。最终命令正常完成。
最佳答案
npm 有一个 progress
配置键。描述如下:
progress
- Default: true, unless TRAVIS or CI env vars set.
- Type: Boolean
When set to
true
, npm will display a progress bar during time intensive operations, ifprocess.stderr
is a TTY.Set to
false
to suppress the progress bar.
也许它无意中被设置为
false
.致
get
/set
progress
您可以使用 npm-config 的配置命令:npm config get progress
false
然后将其设置为 true
通过运行:npm config set progress true
注意: git-bash 可能被归类为“哑终端”
我在早期版本的 Windows 上安装了 git-bash,当我运行时:
npm config get progress
它返回:
undefined
将其设置为
true
没有区别,即它没有进度条。我假设 my terminal (git-bash) is dumb ,即不支持进度条。你的可能也很笨!
关于git - Windows 上的 Git Bash 中没有来自 NPM 命令的进度反馈,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59586270/