【问题标题】:Yeoman angular build process issueYeoman 角度构建过程问题
【发布时间】:2016-01-12 21:28:21
【问题描述】:

我收到此错误,我无法正确解释。 有人可以给我一个很好的提示。 非常感谢 彼得

     Warning: Running "imagemin:dist" (imagemin) task
Fatal error: Cannot read property 'contents' of undefined


Execution Time (2015-11-29 16:40:32 UTC)
loading tasks                   387ms  ▇▇▇▇ 12%
loading grunt-contrib-imagemin   2.6s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 79%
imagemin:dist                   288ms  ▇▇▇ 9%
Total 3.3s Used --force, continuing.

Running "imagemin:dist" (imagemin) task
Fatal error: Cannot read property 'contents' of undefined

【问题讨论】:

  • 请问有什么痕迹?我使用 --force 作为命令运行 grunt。图像的 grunt init 部分类似于 imagemin: { dist: { files: [{ expand: true, cwd: '/images', src: '{,/}.{png,jpg,jpeg,gif}', dest: '/images' }] } }
  • 错误的堆栈跟踪。也许尝试使用grunt --verbose 运行以获取更多详细信息。现在我无法帮助你,因为我根本没有上下文,这个错误可能是任何东西。

标签: gruntjs yeoman-generator yeoman-generator-angular


【解决方案1】:

我遇到了类似的错误。 就我而言,它有助于做:

sudo npm cache clean && npm install grunt-contrib-imagemin

【讨论】:

    【解决方案2】:

    尝试在 package.json 中更新 "grunt-contrib-imagemin": "^1.0.0"。 更多信息在这里:https://github.com/gruntjs/grunt-contrib-imagemin/issues/325

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-04-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-08
      • 2021-09-14
      相关资源
      最近更新 更多