Grunt wiredep:app没有这样的文件或目录bower.json [英] Grunt wiredep:app no such file or directory bower.json

查看:189
本文介绍了Grunt wiredep:app没有这样的文件或目录bower.json的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将我的Yeoman Angular应用程序部署到我的生产服务器上。
当我尝试运行grunt build命令时,出现以下错误:
$ b

I'm trying to deploy my Yeoman's Angular app to my production server. When I try to run the grunt build command I get this error:


运行wiredep:app(wiredep)任务
警告:ENOENT,没有这样的文件或目录'/usr/share/nginx/html/data/gaia-app/app/bower.json'使用--force继续。

Running "wiredep:app" (wiredep) task Warning: ENOENT, no such file or directory '/usr/share/nginx/html/data/gaia-app/app/bower.json' Use --force to continue.

如果我使用 grunt --force ,我的应用程序被破坏...

If I use grunt --force my app is broken...

我在Ubuntu 14.04上

I'm on Ubuntu 14.04

有什么想法?

Any ideas?

推荐答案

如果你想使用'^ 1.9.0' ,一定要从你的Gruntfile.js中删除cwd属性。这是一个常见的问题,如果你是一个角度发电机用户,当前在wiredep任务的配置中指定了一个cwd属性。

If you want to use '^1.9.0', make sure to remove the cwd property from your Gruntfile.js. This is a common issue if you are an angular-generator user which currently specifies a cwd property on the config for the wiredep task.

如果你不介意使用' 1.8.0',请确保将该版本固定在package.json中。如果您通过grunt-wiredep包含wiredep,那么您将不得不手动添加wiredep并将其固定。如果您坚持使用'1.8.0',请将cwd属性保留在任务配置中。

If you don't mind using '1.8.0', make sure to pin that version in your package.json. If you are including wiredep via grunt-wiredep, then you will have to add wiredep manually and pin it. In the case that you stick with '1.8.0', leave the cwd property in the config for the task.

这篇关于Grunt wiredep:app没有这样的文件或目录bower.json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆