Bamboo CI构建中的jpegtran错误

时间:2017-01-22 10:04:16

标签: webpack bamboo jpegtran

我知道jpegtran的ENOENT错误已被问到很多,我在互联网上看到了很多解决方案,但没有一个能为我工作......

这是我在Bamboo上运行webpack任务时遇到的错误:

 ERROR in ./client/assets/img/login_bg.jpg
 Module build failed: Error: spawn /app/bamboo-data/xml-data/build-dir/JOB1/src/main/fed_webapp/node_modules/jpegtran-bin/vendor/jpegtran ENOENT
     at exports._errnoException (util.js:1026:11)
     at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
     at onErrorNT (internal/child_process.js:359:16)
     at _combinedTickCallback (internal/process/next_tick.js:74:11)
     at process._tickCallback (internal/process/next_tick.js:98:9)
  @ ./~/css-loader!./~/stylus-loader?resolve url!./client/app/components/auth/auth.styl 6:57-100
 [19:31:48] Finished 'webpack' after 49 s

我尝试了各种解决方案,但没有一个能为我工作。我正在考虑删除jpeg压缩功能,但我不确定如何正确地执行此操作...

以下是我的package.json和我的加载器列表的示例:

Webpack加载器

loaders: [
      {test: /\.js$/, exclude: [/app\/lib/, /node_modules/], loader: 'ng-annotate!babel'},
      {test: /\.html$/, loader: 'raw'},
      {test: /\.styl$/, loader: 'style!css!stylus?resolve url'},
      {test: /\.css$/, loader: 'style!css?resolve url'},
      {test: /\.(jpe?g|png|gif|svg)$/i, loaders: ['file?hash=sha512&digest=hex&name=assets/[hash].[ext]', 'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false']},
      {test: /\.(eot|woff|woff2|ttf)$/, loader: 'url-loader?limit=30000&name=assets/font/[name].[ext]'}
    ]

的package.json

"css-loader": "^0.19.0",
"html-webpack-plugin": "^1.7.0",
"image-webpack-loader": "^2.0.0",
"imagemin": "^5.2.2",
"imagemin-jpegtran": "^5.0.0",
"imagemin-webp": "^4.0.0",
"jpegtran-bin": "^3.2.0",

欢迎任何帮助,谢谢

1 个答案:

答案 0 :(得分:0)

将所有imagemin和jpegtran依赖项添加到package.json实际上有效。

我必须清理node_modules文件夹以查看更改