【问题标题】:I'm cloning a repo with Yeoman, what configuration do I need on my computer?我正在用 Yeoman 克隆一个 repo,我的电脑需要什么配置?
【发布时间】:2014-02-05 13:27:15
【问题描述】:

我已经克隆了一个安装了 Yeoman 的 repo。

我安装了节点,还有 Yeoman npm i -g yo。当我运行 grunt 时,我收到一条错误消息:

Error: Cannot find module 'load-grunt-tasks' Warning: Task "default" not found. Use --force to continue.

我还需要做什么才能成功运行这个 repo?

【问题讨论】:

    标签: node.js gruntjs yeoman


    【解决方案1】:

    第一次,你必须运行 npm install。

    这将安装package.json中描述的所有必需的依赖项

    随后,如果有人在此文件中添加新的依赖项,您将需要再次运行 npm installnpm update

    【讨论】:

    • 我知道这很简单。非常感谢 Aurélien!
    【解决方案2】:

    其实除了 npm 之外,还应该下载 bower 依赖。
    所以这是两步:

    • npm install
    • bower install

    如果不调用 bower 应用程序可能会启动,但稍后可能会遇到缺少库等问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-15
      • 2012-12-29
      • 1970-01-01
      • 2016-07-16
      • 2014-11-18
      • 2016-09-10
      相关资源
      最近更新 更多