git - Windows 上的 Git Bash 中没有来自 NPM 命令的进度反馈

标签 git npm git-bash

在我的新机器(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, if process.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/

    相关文章:

    npm - 如何安装 webpack-dev-server?获取未满足的依赖项

    git - 将文件推送到远程时权限被拒绝

    带有变量的 Git 别名无法按预期工作 : pathspec did not match any file(s) known to git

    更改文件路径后,git 将文件还原为上一次提交

    python - 不推荐使用全局/系统 git-review 配置文件 (git-review.conf)

    node.js - npm 命令在 Windows (WSL) 上的 Ubuntu 上的 Bash 上不起作用

    node.js - 如何为 child_process.exec 指定 shell 可执行文件?

    git - 在不克隆的情况下在特定提交时获取 git repo

    git - 有没有一种方法可以通过 git 中的所有提交来更改文件的内容?

    npm - 使用 npm 链接时,无法从另一个模块或领域使用 GraphQLSchema "[object GraphQLSchema]"