0

我在雪豹 OSX 6.8 上安装了 Yeoman。当我运行“grunt serve”时,出现以下错误(它找不到我的凉亭包):

Dream-2:app1 goldenheart$ grunt serve
Running "serve" task

Running "clean:server" (clean) task
>> 1 path cleaned.

Running "wiredep:app" (wiredep) task
Warning: Error: Cannot find where you keep your Bower packages. Use --force to continue.

Aborted due to warnings.


Execution Time (2015-05-21 00:17:32 UTC)
loading tasks   2.3s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 92%
wiredep:app    187ms  ▇▇▇▇▇▇▇ 8%
Total 2.5s

我尝试了其他 stackoverflow 帖子上建议的一些事情,例如在本地安装 bower 和 grunt,但我仍然收到上述错误。

4

1 回答 1

2

您可以在项目的根目录中添加一个 .bowerrc 文件。在该文件中,您可以定义 bower 需要安装其软件包的位置。将此添加到该文件中:

{
  "directory": "... your location ..."
}
于 2015-05-21T06:52:08.160 回答