【问题标题】:Why is gulp: command not found after installing it globally - Windows为什么 gulp: 命令在全局安装后找不到 - Windows
【发布时间】:2018-03-10 05:47:52
【问题描述】:

我在使用 npm 5.3.0node v8.5.0 全局安装 gulp 时遇到问题。

首先我确实安装了 gulp

$ npm install gulp-cli --global

然后

$ gulp

结果

bash: gulp: command not found

我已经尝试过这些问题的答案:

  1. https://stackoverflow.com/a/24042936/8680741
  2. https://stackoverflow.com/a/40197889/8680741
  3. https://stackoverflow.com/a/25126461/8680741
  4. npm 安装和 npm 更新

【问题讨论】:

标签: node.js npm gulp git-bash


【解决方案1】:

确保您的 Git Bash 在您的 (~/.bash_profile,与 C:\Users\Jash\.bash_profile 相同) 中列出全局模块目录。我认为,您需要在该文件的最开头添加一行:

export PATH="/c/Program Files/nodejs/":$PATH

【讨论】:

    猜你喜欢
    • 2016-06-09
    • 2014-04-09
    • 2014-09-25
    • 1970-01-01
    • 2014-07-24
    • 2019-12-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多