【问题标题】:GitBash installed but not able to find any node moduleGitBash 已安装但无法找到任何节点模块
【发布时间】:2021-05-12 11:34:17
【问题描述】:

我已经在 Windows 10 中安装了 git-bash。之后,我使用 -g 全局安装了 http-server 和 lerna。当我尝试使用 git bash 访问 http-server 或 lerna 时,它显示“找不到命令”。如果我尝试使用 cmd 提示符,它可以工作。

【问题讨论】:

    标签: node.js git windows-10


    【解决方案1】:

    这里的问题是关于 PATH 变量。您应该将 npm 全局脚本路径添加到您的 PATH 变量中。

    您的问题可能在以下链接中有正确答案。

    https://stackoverflow.com/questions/31694646/http-server-command-not-found-after-install-in-npm#:~:text=you%20should%20add%20the%20npm,%22%2C%20run%20the%20below%20command.&text=bashrc%20file%20in%20your%20home,commands%20on%20your%20git%20bash.

    【讨论】:

      猜你喜欢
      • 2021-07-25
      • 2012-03-31
      • 2018-03-08
      • 2012-03-05
      • 2020-12-25
      • 1970-01-01
      • 2019-01-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多