我正在尝试将 Yeoman 的 Angular 应用程序部署到我的生产服务器。 当我尝试运行 grunt build 命令时,出现此错误:
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
,我的应用程序就会损坏...
我使用的是 Ubuntu 14.04
有什么想法吗?
最佳答案
此问题有两种解决方案,具体取决于您要使用的wiredep版本。
如果您想使用“^1.9.0”,请确保从 Gruntfile.js 中删除 cwd 属性。如果您是 Angular-generator 用户,并且当前在wiredep 任务的配置上指定了 cwd 属性,那么这是一个常见问题。
如果您不介意使用“1.8.0”,请确保将该版本固定在 package.json 中。如果您通过 grunt-wiredep 包含wiredep,那么您将必须手动添加wiredep并固定它。如果您坚持使用“1.8.0”,请将 cwd 属性保留在任务的配置中。
关于gruntjs - 咕噜有线EP :app no such file or directory bower. json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25709324/