【问题标题】:Cannot find module ‘gulp’找不到模块“gulp”
【发布时间】:2017-01-03 22:13:32
【问题描述】:

当我运行ionic build android 命令时,我收到以下错误:

WARN: ionic.project has been renamed to ionic.config.json, please rename it.
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'gulp'

Do you need to run `npm install`?

我已经尝试过运行这个命令:

npm install --save-dev gulp

但我仍然遇到同样的错误。我在这里遗漏了什么吗?

【问题讨论】:

    标签: android node.js ionic-framework npm gulp


    【解决方案1】:

    您需要使用以下命令全局安装 Gulp:npm install --global gulp-cli,如 Gulp documentation 中所述。

    【讨论】:

    • 现在我收到WARN: ionic.project has been renamed to ionic.config.json, please rename it. Uh oh! Looks like you're missing a module in your gulpfile: Cannot find module 'bower' 你需要运行 npm install 吗?我已经做了npm install -g bower 但给出了同样的错误
    • 如果你在终端输入bower会发生什么?
    • 您也可以尝试使用 npm install bower 在本地安装,但我真的不知道是什么导致了这个问题。
    • 您是否看过与您看到的这个新错误相关的这篇文章? stackoverflow.com/questions/37078620/…
    【解决方案2】:

    请尝试运行以下命令:

    npm install -g gulp
    npm install 
    

    【讨论】:

      猜你喜欢
      • 2017-06-24
      • 2019-05-26
      • 1970-01-01
      • 2017-11-07
      • 2018-10-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多