tcoopman / image-webpack-loader Goto Github PK
View Code? Open in Web Editor NEWImage loader module for webpack
License: MIT License
Image loader module for webpack
License: MIT License
JPG files works fine.. however png files.. throw this error
ERROR in ./assets/images/layout-assets/features-bg.png
Module build failed: Error: Command failed: /Users/milewski/Documents/Code/monster-rally/node_modules/pngquant-bin/vendor/pngquant --output /var/folders/22/6b087x7s7fvbbsmbrx054w180000gn/T/1dc90c33-e079-4d55-9230-aa6f0d82865d /var/folders/22/6b087x7s7fvbbsmbrx054w180000gn/T/22669942-570a-4782-8cdf-e310353f2ab6 --quality 65-90 --speed 4
if i remove the pngquant config.. it works (and does get minified...)... however i have no control over the defaults..
progressive: true,
optimizationLevel: 4,
interlaced: false,
//pngquant: {
// quality: '65-90',
// speed: 4
//}
Webpack has a function to load config from a config section in webpack config as well as from a query string on the loader itself.
Upon using even the most basic 'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false'
I get the following errors:
(node) warning: possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at EventEmitter.addListener (events.js:239:17)
at module.exports (H:\Dev\node_modules\signal-exit\index.js:41:11)
at module.exports.promise (H:\Dev\node_modules\execa\index.js:146:23)
at H:\Dev\node_modules\exec-buffer\index.js:35:15
As soon as I remove the loader, everything is fine.
My webpack:
var webpack = require('webpack'),
HtmlWebpackPlugin = require('html-webpack-plugin'),
ExtractTextPlugin = require('extract-text-webpack-plugin'),
helpers = require('./helpers');
module.exports = {
entry: {
'polyfills': './src/polyfills.ts',
'vendor': './src/vendor.ts',
'app': './src/main.ts'
},
resolve: {
extensions: ['', '.js', '.ts']
},
module: {
loaders: [
{
test: /\.ts$/,
loaders: [
'awesome-typescript-loader',
'angular2-template-loader'
]
},
{
test: /\.html$/,
loader: 'html'
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
loaders: [
'file?name=assets/[name].[hash].[ext]',
'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false'
]
},
{
test: /\.css$/,
exclude: helpers.root('src', 'app'),
loader: ExtractTextPlugin.extract('style', 'css?sourceMap')
},
{
test: /\.css$/,
include: helpers.root('src', 'app'),
loader: 'raw'
}
]
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: ['app', 'vendor', 'polyfills']
}),
new HtmlWebpackPlugin({
template: 'src/index.html'
}),
new webpack.ProvidePlugin({
jQuery: 'jquery',
$: 'jquery',
jquery: 'jquery'
})
],
};
I've made many tests using Webpack 2 and image-webpack-loader 3.1.0
bypassOnDebug seems not to be working (either in global options or in mozjpeg options)
{
loader : "image-webpack-loader",
options : {
bypassOnDebug : true,
mozjpeg : { bypassOnDebug: true, quality: 5, progressive: true },
optipng : { optimizationLevel: 7 },
gifsicle : { interlaced: false }
}
}
Also, the README associates bypassOnDebug
exclusively with mozjpeg
but bypassOnDebug
is global to the loader right? (mozjpeg doesn't show any bypassOnDebug
option)
imagemin got broken because of a broken dep.
something is very odd, it is being called twice
keeps showing up. ref imagemin/imagemin#132
My time is very limited at the moment and I can't give this package the love it needs.
If someone is interested in helping maintain this package, please give a shout!
I don't have any expectations at the moment, so just let me know what you want to do. This package doesn't require lot's of maintenance, but someone who can keep an eye to updated dependencies and bugs would help.
I already gave @pavelloz acces, but if anyone else wants to help out that would be great!
I config image-webpack-loader like this:
{
test: /\.(jpe?g|png|gif|svg)$/i,
loaders: [
'file?hash=sha512&digest=hex&name=[hash].[ext]',
'image-webpack?{optimizationLevel:7, imageminPngquant:{ floyd: 0.1, quality: 0 }}'
]
}
I have found whatever I change optimizationLevel
to 0 or 7, the size of built image is not reduced...And I try almost options in the document, and nothing change, so what's the problem in this example? In another way, can you upload a example including config file and source image, so we can see whether the example works on my computer
My webpack.config.js
var path = require('path')
var webpack = require('webpack')
const configs = [{
entry: './assets/index.js',
output: {
path: path.resolve(__dirname, 'build'),
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
use: 'babel-loader'
},
{
test: /\.(sass|scss)$/,
use: [
'style-loader',
'css-loader',
'sass-loader'
]
},
{
test: /\.(png|jpg|gif|svg)$/,
use: [
'file-loader?context=assets/&name=[path][name].[ext]&publicPath=build/',
{
loader: 'image-webpack-loader',
options: {
mozjpeg: {
progressive: true
},
gifsicle: {
interlaced: false
},
optipng: {
optimizationLevel: 4
},
pngquant: {
quality: '75-90',
speed: 3
}
}
}
]
}
]
},
plugins: [
new webpack.ProvidePlugin({
jQuery: 'jquery',
$: 'jquery',
jquery: 'jquery',
'window.jQuery': 'jquery',
Tether: 'tether'
})
]
}
]
module.exports = configs
I get these errors after runing webpack:
Hash: bf148b3489e2aabad21e
Version: webpack 2.2.0
Child
Hash: bf148b3489e2aabad21e
Time: 14091ms
Asset Size Chunks Chunk Names
bundle.js 645 kB 0 [emitted] [big] main
[72] ./assets/img/arrow-white-xl.png 562 bytes {0} [built] [failed] [1 error]
[75] ./assets/js/app.js 680 bytes {0} [built]
[76] ./assets/sass/app.scss 1.04 kB {0} [built]
[77] ./assets/js/canvasmenu.js 2.15 kB {0} [built]
[78] ./assets/js/homecarousel.js 3.56 kB {0} [built]
[79] ./assets/js/map.js 3.34 kB {0} [built]
[105] ./~/bootstrap/dist/js/bootstrap.js 106 kB {0} [built]
[179] ./~/tether/dist/js/tether.js 60.4 kB {0} [built]
[186] ./~/css-loader!./~/sass-loader!./assets/sass/app.scss 57.7 kB {0} [built]
[189] ./assets/img/arrow-black-down.png 562 bytes {0} [built] [failed] [1 error]
[190] ./assets/img/arrow-gray-small.png 562 bytes {0} [built] [failed] [1 error]
[191] ./assets/img/bg-silver-effect.png 562 bytes {0} [built] [failed] [1 error]
[192] ./assets/img/home-carousel-box-sample-1.png 562 bytes {0} [built] [failed] [1 error]
[201] ./~/style-loader/addStyles.js 7.15 kB {0} [built]
[204] ./assets/index.js 63 bytes {0} [built]
+ 190 hidden modules
ERROR in ./assets/img/pipe.png
Module build failed: Error: A rendszer nem tal�lja a megadott el�r�si utat.
at notFoundError (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
@ ./~/css-loader!./~/sass-loader!./assets/sass/app.scss 6:2591-2617
@ ./assets/sass/app.scss
@ ./assets/index.js
ERROR in ./assets/img/arrow-black-down.png
Module build failed: Error: A rendszer nem tal�lja a megadott el�r�si utat.
at notFoundError (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
@ ./~/css-loader!./~/sass-loader!./assets/sass/app.scss 6:1041-1079
@ ./assets/sass/app.scss
@ ./assets/index.js
ERROR in ./assets/img/arrow-white-xl.png
Module build failed: Error: A rendszer nem tal�lja a megadott el�r�si utat.
at notFoundError (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
@ ./~/css-loader!./~/sass-loader!./assets/sass/app.scss 6:6594-6630 6:7380-7416
@ ./assets/sass/app.scss
@ ./assets/index.js
ERROR in ./assets/img/home-carousel-box-sample-1.png
Module build failed: Error: A rendszer nem tal�lja a megadott el�r�si utat.
at notFoundError (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
@ ./~/css-loader!./~/sass-loader!./assets/sass/app.scss 6:10955-11003
@ ./assets/sass/app.scss
@ ./assets/index.js
ERROR in ./assets/img/logo-watermark.png
Module build failed: Error: A rendszer nem tal�lja a megadott el�r�si utat.
at notFoundError (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
@ ./~/css-loader!./~/sass-loader!./assets/sass/app.scss 6:6069-6105
@ ./assets/sass/app.scss
@ ./assets/index.js
ERROR in ./assets/img/arrow-white.png
Module build failed: Error: A rendszer nem tal�lja a megadott el�r�si utat.
at notFoundError (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
@ ./~/css-loader!./~/sass-loader!./assets/sass/app.scss 6:4962-4995 6:36814-36847 6:46891-46924
@ ./assets/sass/app.scss
@ ./assets/index.js
ERROR in ./assets/img/bg-silver-effect.png
Module build failed: Error: A rendszer nem tal�lja a megadott el�r�si utat.
at notFoundError (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
@ ./~/css-loader!./~/sass-loader!./assets/sass/app.scss 6:5800-5838
@ ./assets/sass/app.scss
@ ./assets/index.js
ERROR in ./assets/img/arrow-gray-small.png
Module build failed: Error: A rendszer nem tal�lja a megadott el�r�si utat.
at notFoundError (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
@ ./~/css-loader!./~/sass-loader!./assets/sass/app.scss 6:21027-21065
@ ./assets/sass/app.scss
@ ./assets/index.js
ERROR in ./assets/img/masonry-sample-1x1.png
Module build failed: Error: A rendszer nem tal�lja a megadott el�r�si utat.
at notFoundError (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
@ ./~/css-loader!./~/sass-loader!./assets/sass/app.scss 6:16569-16609
@ ./assets/sass/app.scss
@ ./assets/index.js
ERROR in ./assets/img/masonry-sample-2x1.png
Module build failed: Error: A rendszer nem tal�lja a megadott el�r�si utat.
at notFoundError (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
@ ./~/css-loader!./~/sass-loader!./assets/sass/app.scss 6:17496-17536
@ ./assets/sass/app.scss
@ ./assets/index.js
ERROR in ./assets/img/masonry-sample-1x2.png
Module build failed: Error: A rendszer nem tal�lja a megadott el�r�si utat.
at notFoundError (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
@ ./~/css-loader!./~/sass-loader!./assets/sass/app.scss 6:18103-18143
@ ./assets/sass/app.scss
@ ./assets/index.js
ERROR in ./assets/img/reasons.png
Module build failed: Error: A rendszer nem tal�lja a megadott el�r�si utat.
at notFoundError (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
@ ./~/css-loader!./~/sass-loader!./assets/sass/app.scss 6:8920-8949 6:9914-9943
@ ./assets/sass/app.scss
@ ./assets/index.js
ERROR in ./assets/img/masonry-sample-2x2.png
Module build failed: Error: A rendszer nem tal�lja a megadott el�r�si utat.
at notFoundError (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (F:\xampp\htdocs\hp-sitebuild\node_modules\execa\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
@ ./~/css-loader!./~/sass-loader!./assets/sass/app.scss 6:18232-18272
@ ./assets/sass/app.scss
@ ./assets/index.js
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Evista\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.3.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `npm rebuild node-sass && node node_modules/webpack/bin/webpack.js --optimize-minimize --config webpack.config.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script 'npm rebuild node-sass && node node_modules/webpack/bin/webpack.js --optimize-minimize --config webpack.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the home-and-people package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm rebuild node-sass && node node_modules/webpack/bin/webpack.js --optimize-minimize --config webpack.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs home-and-people
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls home-and-people
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! F:\xampp\htdocs\hp-sitebuild\npm-debug.log
"A rendszer nem találja a megadott elérési utat." means "The system cannot resolve/found defined path."
Hi, i'm trying to compress a PNG with the example settings you provided in the README file:
'image-webpack?{progressive:true, optimizationLevel: 7, interlaced: false, pngquant:{quality: "65-90", speed: 4}}'
However, when i run my build, i get this error:
ERROR in ./src/assets/images/highResHell.png
Module build failed: Error: Command failed: /home/elias/Projects/Javascript/idexdanmark/node_modules/pngquant-bin/vendor/pngquant --output /tmp/012c00ce-0e87-4c68-bfa8-185586e92037 /tmp/7add16f3-8bf9-4ad2-b370-ad97ce2b9856 --quality 65-90 --speed 4
at ChildProcess.exithandler (child_process.js:202:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
@ ./src/components/ExampleComponent/index.js 7:19-59
I tried removing my node_modules folder and reinstalling my dependencies, but it had no effect.
Recently, I ran into a very strange error with image-webpack-loader
My project were all right util I add some new vendor recently. I have 6 pages in my project and each page has it's style file. If 6 file has this code @import "../../cssBase/index.scss";
, image-webpack-loader will have some errors. But if I delete this code in one of my pages, all errors have gone. I wonder why this would happen. Is it because I have too many images?
Here's my code:
//my pages
const PAGES = ['home', 'profile', 'match', 'mall', 'goodsInfo', 'cartList']
//my webpack entries
let entry = {}
PAGES.forEach((page) => {
entry[`js/${page}`] = ['babel-polyfill', 'whatwg-fetch', path.join(PATH.src, `view/pages/${page}/index.js`)]
entry[`css/${page}`] = path.join(PATH.src, `view/pages/${page}/index.scss`)
if(DEV) {
entry[`js/${page}`].push('webpack-hot-middleware/client')
}
})
//my image-webpack-loader configuration
{ test: /\.(png|jpg|gif)$/, include: paths,
loaders: [
'url?limit=2000&name=./img/[name].[hash].[ext]',
'image-webpack?{progressive:true, bypassOnDebug:true, optimizationLevel: 3, interlaced: false, pngquant:{quality: "65-90", speed: 4}}'
]
}
//my pages' style file contain this file, this file defines lots of variables and include some import file
@import "../../cssBase/index.scss";
Here's my errors:
Module build failed: ModuleBuildError: Module build failed: Error: spawn /Users/Zero/projects/livebet-client-code/node_modules/pngquant-bin/vendor/pngquant EAGAIN
at exports._errnoException (util.js:949:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
at onErrorNT (internal/child_process.js:348:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at DependenciesBlock.onModuleBuildFailed (/Users/Zero/projects/livebet-client-code/node_modules/webpack-core/lib/NormalModuleMixin.js:315:19)
at nextLoader (/Users/Zero/projects/livebet-client-code/node_modules/webpack-core/lib/NormalModuleMixin.js:270:31)
at /Users/Zero/projects/livebet-client-code/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
at context.callback (/Users/Zero/projects/livebet-client-code/node_modules/webpack-core/lib/NormalModuleMixin.js:148:14)
at imagemin.buffer.then.catch.err (/Users/Zero/projects/livebet-client-code/node_modules/image-webpack-loader/index.js:42:9)
at process._tickCallback (internal/process/next_tick.js:103:7)
ERROR in ./feSRC/img/flags/[email protected]
Module build failed: Error: spawn /Users/Zero/projects/livebet-client-code/node_modules/pngquant-bin/vendor/pngquant EAGAIN
at exports._errnoException (util.js:949:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
at onErrorNT (internal/child_process.js:348:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
@ .//css-loader?sourceMap&localIdentName=[path][name]---[local]---[hash:base64:5]!.//postcss-loader!./feSRC/view/pages/profile/index.scss 6:13630-13675
Seems like the package ins't configured by default to be transpiled from ES2015, so when I try to use the packages, it returns errors regarding ES2015 specific syntax, shouldn't it be transpiled first?
I really would like to use the imagemin-pngquant plugin.
I have been using it in gulp-imagemin like this
Would be great to see this supported for webpack as well, since pngquant's results are quite significant!
I keep getting this error It's no longer allowed to omit the '-loader' suffix when using loaders.
when trying either:
{
test: /.*\.(gif|png|jpe?g|svg)$/i,
loaders: [
'file-loader',
{
loader: 'image-webpack-loader',
query: {
progressive: true,
optimizationLevel: 7,
interlaced: false,
pngquant: {
quality: '65-90',
speed: 4
}
}
}
]
}
or just using loader: 'image-webpack-loader',
When I use require('../images/logo.svg') from a jsx file I get:
url("bin/140ecd6f79ed67a762b4a81016eb3485.svg")
Which is correct. When I use background: url('../image/logo.svg'); from a scss file (loaded with sass-loader), this is replaced by:
url("140ecd6f79ed67a762b4a81016eb3485.svg") which is missing the "bin" dir. Is this an issue with sass-loader or image-loader?
I have a problem with using this loader on Windows machine. I use Jenkins with Windows for CI and during build I get this error:
Module not found: Error: Cannot resolve module 'file' in c:\jenkins\workspace\Magazine.Live.My.FeatureBranch\client\app\common\top_bar
resolve module file in c:\jenkins\workspace\Magazine.Live.My.FeatureBranch\client\app\common\top_bar
looking for modules in c:\jenkins\workspace\Magazine.Live.My.FeatureBranch\node_modules
module variation file-webpack-loader
c:\jenkins\workspace\Magazine.Live.My.FeatureBranch\node_modules\file-webpack-loader doesn't exist (module as directory)
resolve 'file' file-webpack-loader in c:\jenkins\workspace\Magazine.Live.My.FeatureBranch\node_modules
resolve file
c:\jenkins\workspace\Magazine.Live.My.FeatureBranch\node_modules\file-webpack-loader doesn't exist
Locally, I build on Mac and build is working.
I have image-webpack-loader added to in my package.json.
My webpack.config looks like this:
{ test: /\.(jpe?g|png|gif|svg)$/i, loaders: [
'file?hash=sha512&digest=hex&name=[hash].[ext]',
'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false'
]
}
I import svg file in the file:
import logo from './../../../asset/img/logo.svg';
I guess problem can be in path to the image. During build the path to the file becomes ./asset/img/logo.svg.
Just updated to v3 and during installation I got:
[email protected] postinstall /node_modules/mozjpeg
> node lib/install.js
⚠ The `/node_modules/mozjpeg/vendor/cjpeg` binary doesn't seem to work correctly
⚠ mozjpeg pre-build test failed
ℹ compiling from source
✖ Error: autoreconf -fiv && ./configure --disable-shared --prefix="/node_modules/mozjpeg/vendor" --bindir="/node_modules/mozjpeg/vendor" --libdir="/node_modules/mozjpeg/vendor" && make --jobs=8 && make install --jobs=8
Command failed: /bin/sh -c autoreconf -fiv
/bin/sh: autoreconf: command not found
at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:475:12)
Is there a reason why you can't pass options to those two? Instead you can only supply this:
interlaced (for gifsicle)
optimizationLevel (for optipng)
Hello :)
I am using this awesome loader but there seems to be a problem if installed with yarn. Out of the blue i get this error when building for production (basically if i use it)
ERROR in ./[...]/image.png
Module build failed: Error: spawn [...]/project-name/node_modules/pngquant-bin/vendor/pngquant ENOENT
at exports._errnoException (util.js:1022: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)
If i install the dependencies with npm
, everything works as intended. What am I doing wrong?
Thank you!
LE:
i'm using webpack2
though
this happens only with yarn 0.17
version 0.16.1
works as intended :)
this is from the config
{
test: /.*\.(gif|png|jpe?g|svg)$/i,
use: [
{
loader: 'file-loader',
options: {
name: '[path][hash].[ext]'
}
},
{
loader: 'image-webpack-loader',
options: {
progressive: true,
optimizationLevel: 7,
interlaced: false,
pngquant: {
quality: '65-90',
speed: 4
}
}
}
After upgrading to 3.0.0, I'm getting this error:
ERROR in ./static/dist/images/products/Product_Landing_Quote.jpg
[2] Module build failed: Error: dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
[2] Referenced from: /Users/ev/Git/cumul8.com/node_modules/mozjpeg/vendor/cjpeg
[2] Reason: image not found
[2]
[2] at Promise.all.then.arr (/Users/ev/Git
[2] /cumul8.com/node_modules/execa/index.js:170:11)
[2] at process._tickCallback (internal/process/next_tick.js:103:7)
[2] @ ./~/css-loader?module&localIdentName=[name]__[local]___[hash:base64:5]!./~/postcss-loader!./~/stylus-loader!./src/styles/pages/Products.styl 6:2152-2225
This error doesn't happen on the 2.x.x version.
I've 2 questions:
After optimizing where does it put the images? I tried dummy 1MB image and after running my webpack, it didn't seem to do anything! I also ran webpack -p for the build but it didn't seem to do anything on my 1MB test.jpg. In fact, it tried compressing svg file which actually was supposed to be embedded in my css file because I use url-loader. And moreover, it corrupted that svg!
How to use it along with url-loader like I can use https://github.com/thetalecrafter/img-loader
module:{
preLoaders:[{
test:/.js$/,
loader:'jshint-loader'
},{
test:/.{jpg|jpeg|png|gif}$/i,
loader:'image-webpack?{progressive:true, optimizationLevel: 7, interlaced: false}'
}],
loaders:[{
test:/.css$/,
loader:'style-loader!css-loader'
},{
test:/.html$/,
loader:'html-loader'
},{
test:/(._)[/|]img[/|]([^]
},
Right now if you try to require a svg you just get the filename, but I want the content of the svg after it has been through svgomg.
Is there an example on how to do that? I looked in the test folder, but found none.
full error:
ERROR in ./src/images/bg.jpg
Module build failed: Error: dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
Referenced from: /Users/dulin/workspace/webpack-summer/node_modules/mozjpeg/vendor/cjpeg
Reason: image not found
at Promise.all.then.arr (/Users/dulin/workspace/webpack-summer/node_modules/execa/index.js:170:11)
at process._tickCallback (internal/process/next_tick.js:103:7)
@ ../~/css-loader!./src/style.css 6:100-126
it seems not support jpg
image?
I'm really new to frontend development and webpack ecosystem, I have a problem while trying to set up and use image-webpack-loader
. Thanks in advace for your great work and support.
This is what I'm trying at my module webback config section:
module: {
//Loaders to interpret non-vanilla javascript code as well as most other extensions including images and text.
preLoaders: [
{
//Eslint loader
test: /\.(js|jsx)$/,
loader: 'eslint-loader',
include: [path.resolve(__dirname, "src/app")],
exclude: [nodeModulesPath]
},
],
loaders: [
{
//React-hot loader and
test: /\.(js|jsx)$/, //All .js and .jsx files
loaders: ['react-hot', 'babel'], //react-hot is like browser sync and babel loads jsx and es6-7
exclude: [nodeModulesPath]
},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract(
'style-loader',
'css-loader!sass'
)
},
{
test: /.*\.(gif|png|jpe?g|svg)$/i,
loaders: [
'file?hash=sha512&digest=hex&name=[hash].[ext]',
'image-webpack?{progressive:true, optimizationLevel: 7, interlaced: false, pngquant:{quality: "65-90", speed: 4}}'
]
},
{
test: /\.svg$/,
loader: 'svg-sprite?' + JSON.stringify({
name: '[name]_[hash]',
prefixize: true
})
},
]
},
So this are the error logs:
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 6:11-56
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 7:12-58
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 8:12-58
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 9:18-71
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 10:11-56
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 11:7-48
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 12:13-60
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 13:17-69
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 14:8-50
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 15:9-52
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 16:9-52
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 17:8-50
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 18:10-54
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 19:9-52
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 20:11-56
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 21:10-54
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 22:9-52
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 23:10-54
ERROR in ./src/app/constants/glyphs.js
Module not found: Error: Cannot resolve module 'file' in /storage/dev/signore/xolito/repos/web/src/app/constants
@ ./src/app/constants/glyphs.js 24:13-60
I tried a couple changes in loaders distrubution but kept getting such errors, I just need for an advise, as I'm almost sure I must be doing something wrong.
I would like to have svgs either bundled up all together in one or somehow bundle it along with my full production bundles. Is this possible?
I am getting this error while including bootstrap with less support,
Please help me to solve this issue
I was doing server-side rendering with image-loader but got Module not found: Error: Cannot resolve module 'image'
when target
is configured to node
.
The following is my webpack config:
module.exports = {
target: 'node',
module: {
loaders: [
{
test: /\.(jpe?g|png|gif|svg)$/i,
loaders: [
'file?hash=sha512&digest=hex&name=[hash].[ext]',
'image?bypassOnDebug&optimizationLevel=7&interlaced=false'
]
}
]
}
};
Hi, I am trying to deploy to Google App Engine (node). This code works fine locally and on Heroku. However on GAE, I get the following build error and the code dosnt run.
I have not been able to work out how to apply the suggested fix "make sure that libpng-dev is installed"
[email protected] postinstall /app/node_modules/pngquant-bin
node lib/install.js
ÔÜá The /app/node_modules/pngquant-bin/vendor/pngquant
binary doesn't seem to work correctly
ÔÜá pngquant pre-build test failed
Ôä╣ compiling from source
Ô£û Error: pngquant failed to build, make sure that libpng-dev is installed
at ChildProcess.exithandler (child_process.js:202:12)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
Would you mind adding a CHANGELOG.md (or a Github release description)?
Because it is a bit hard to understand what changed between v1.8 and v2.0.
Thanks
Can I use this loader for background-image url(bla)
in css? If so, how do I configure webpack/code the url?
Many thanks in advance.
got this error when trying to do npm install.
As written in webpack loader guideline,
use a library as peerDependencies when they wrap it
using a peerDependency allows the application developer to specify the exact version in his >package.json if he wants to. The dependency should be relative open to allow updating the library >without needing to publish a new loader version."peerDependencies": {
"library": "^1.3.5"
}npm ERR! peerinvalid The package file-loader does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer [email protected] wants file-loader@^0.8.1 npm ERR! peerinvalid Peer [email protected] wants file-loader@*
we should make the file-loader more open.
I installed this plugin then added this to my webpack plugins
webpack.config
{
test: /\.(jpe?g|png|gif|svg)$/i,
loaders: [
'file?hash=sha512&digest=hex&name=[hash].[ext]',
'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false'
]
},
now I have one entry point app.js
require('styles/icons')
styles/icons.scss whose content is
@each $keyword in 'fn', 'dn' {
@each $color-keyword in 'red', 'white' {
.icon--#{$keyword}--#{$color-keyword} {
background: url("../svg/icon--#{$keyword}--#{$color-keyword}.svg") no-repeat left top;
background-size: contain;
}
.svg-off .icon--#{$keyword}--#{$color-keyword} {
background-image: url("../images/icon--#{$keyword}--#{$color-keyword}.png");
}
}
}
This compiles fine and when I load my webpage I see
.icon--fn--red {
background: url(/assets/6e4ae90369b7deca283f326cdb52060e.svg) no-repeat left top;
background-size: contain;
}
But then I look at that file /assets/6e4ae90369b7deca283f326cdb52060e.svg and I see
module.exports = __webpack_public_path__ + "695fb5da0124fe2dd0c33bab5f22f59e.svg"
I checked the file 695fb5da0124fe2dd0c33bab5f22f59e.svg and it points to the correct svg.
When I try to access /assets/6e4ae90369b7deca283f326cdb52060e.svg in the browser I get
This page contains the following errors:
error on line 1 at column 1: Document is empty
Below is a rendering of the page up to the first error.
How do I fix this?
I'm getting this error, looks like simillar to #16 :
ERROR in ./src/front/components/splash/splash-mobile.jpg
Module build failed: Error: spawn /home/admin/node/greatbytrain/node_modules/jpegtran-bin/vendor/jpegtran ENOENT
at exports._errnoException (util.js:1036: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!./~/resolve-url-loader!./~/sass-loader!./src/front/components/splash/styles.scss 6:95-125
Ubuntu 12.04
node 6.7.0
npm 3.10.8
I just setup webpack-dev-server with the hot module replacement. Everything seems to work fine except I don't get any of my images or svg processed with this plugin like they do when I don't use the webpack-dev-server. They seem to bundle find and I even see in my css using the browser that the path to the svg was replaced with /assets/3234325awoe34.svg, how can I debug this?
Any idea the changes I need to make ?
gulp.task("webpack:dev-server", function(callback) {
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true,
proxy: {
"*": "http://myapp.app"
}
}).listen(8081, 'localhost', function (err, result) {
if (err) {
console.log(err);
}
callback()
console.log('Listening at localhost');
});
});
This is what use to work when I wasn't using the webpack-dev-server
{
test: /\.(jpe?g|png|gif|svg)(?:\?.*|)$/i,
loaders: [
'file?hash=sha512&digest=hex&name=[hash].[ext]',
'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false'
]
},
v1.6.1
node v4.2.0
I get the above error for each svg file that I require. It appears that upgrading node has broken this. I had this working before with this same configuration.
usage:
module: {
loaders: [
{
test: /.svg$/,
loaders: [
'raw',
'image-webpack'
]
}
]
},
ERROR in ./client/src/img/svg/add.svg
Module build failed: TypeError: Invalid non-string/buffer chunk
at chunkInvalid (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:421:10)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:176:12)
at DuplexWrapper.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:162:10)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/duplexer2/index.js:50:15)
at emitOne (events.js:77:13)
at Through2.emit (events.js:169:7)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:786:14)
at emitNone (events.js:67:13)
at Through2.emit (events.js:166:7)
at emitReadable_ (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
at emitReadable (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
at Through2.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
at Through2.Transform.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
at afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:101:12)
at TransformState.afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:48:5
at optimizeOnceCallback (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:43:17)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:65:9
at Object.sax.onend (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:140:26)
at emit (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:625:33)
at end (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:667:3)
at Object.write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:929:30)
at Object.SAXParser.close (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:153:38)
at module.exports (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:144:21)
at SVGO._optimizeOnce (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:56:5)
at SVGO.optimize (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:48:11)
at Through2._transform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:32:9)
at Through2.Transform._read (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Through2.Transform._write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
@ ./client/src/flow/ui/react/components/NewGameForm.js 43:17-51
ERROR in ./client/src/img/svg/logo.svg
Module build failed: TypeError: Invalid non-string/buffer chunk
at chunkInvalid (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:421:10)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:176:12)
at DuplexWrapper.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:162:10)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/duplexer2/index.js:50:15)
at emitOne (events.js:77:13)
at Through2.emit (events.js:169:7)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:786:14)
at emitNone (events.js:67:13)
at Through2.emit (events.js:166:7)
at emitReadable_ (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
at emitReadable (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
at Through2.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
at Through2.Transform.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
at afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:101:12)
at TransformState.afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:48:5
at optimizeOnceCallback (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:43:17)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:65:9
at Object.sax.onend (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:140:26)
at emit (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:625:33)
at end (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:667:3)
at Object.write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:929:30)
at Object.SAXParser.close (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:153:38)
at module.exports (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:144:21)
at SVGO._optimizeOnce (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:56:5)
at SVGO.optimize (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:48:11)
at Through2._transform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:32:9)
at Through2.Transform._read (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Through2.Transform._write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
@ ./client/src/flow/ui/react/components/Header.js 27:18-53
ERROR in ./client/src/img/svg/settings.svg
Module build failed: TypeError: Invalid non-string/buffer chunk
at chunkInvalid (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:421:10)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:176:12)
at DuplexWrapper.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:162:10)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/duplexer2/index.js:50:15)
at emitOne (events.js:77:13)
at Through2.emit (events.js:169:7)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:786:14)
at emitNone (events.js:67:13)
at Through2.emit (events.js:166:7)
at emitReadable_ (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
at emitReadable (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
at Through2.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
at Through2.Transform.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
at afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:101:12)
at TransformState.afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:48:5
at optimizeOnceCallback (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:43:17)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:65:9
at Object.sax.onend (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:140:26)
at emit (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:625:33)
at end (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:667:3)
at Object.write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:929:30)
at Object.SAXParser.close (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:153:38)
at module.exports (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:144:21)
at SVGO._optimizeOnce (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:56:5)
at SVGO.optimize (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:48:11)
at Through2._transform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:32:9)
at Through2.Transform._read (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Through2.Transform._write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
@ ./client/src/flow/ui/react/components/Header.js 33:22-61
ERROR in ./client/src/img/svg/disconnected.svg
Module build failed: TypeError: Invalid non-string/buffer chunk
at chunkInvalid (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:421:10)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:176:12)
at DuplexWrapper.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:162:10)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/duplexer2/index.js:50:15)
at emitOne (events.js:77:13)
at Through2.emit (events.js:169:7)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:786:14)
at emitNone (events.js:67:13)
at Through2.emit (events.js:166:7)
at emitReadable_ (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
at emitReadable (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
at Through2.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
at Through2.Transform.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
at afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:101:12)
at TransformState.afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:48:5
at optimizeOnceCallback (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:43:17)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:65:9
at Object.sax.onend (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:140:26)
at emit (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:625:33)
at end (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:667:3)
at Object.write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:929:30)
at Object.SAXParser.close (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:153:38)
at module.exports (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:144:21)
at SVGO._optimizeOnce (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:56:5)
at SVGO.optimize (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:48:11)
at Through2._transform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:32:9)
at Through2.Transform._read (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Through2.Transform._write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
@ ./client/src/flow/ui/react/components/Header.js 39:26-69
ERROR in ./client/src/img/svg/close.svg
Module build failed: TypeError: Invalid non-string/buffer chunk
at chunkInvalid (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:421:10)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:176:12)
at DuplexWrapper.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:162:10)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/duplexer2/index.js:50:15)
at emitOne (events.js:77:13)
at Through2.emit (events.js:169:7)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:786:14)
at emitNone (events.js:67:13)
at Through2.emit (events.js:166:7)
at emitReadable_ (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
at emitReadable (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
at Through2.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
at Through2.Transform.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
at afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:101:12)
at TransformState.afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:48:5
at optimizeOnceCallback (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:43:17)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:65:9
at Object.sax.onend (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:140:26)
at emit (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:625:33)
at end (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:667:3)
at Object.write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:929:30)
at Object.SAXParser.close (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:153:38)
at module.exports (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:144:21)
at SVGO._optimizeOnce (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:56:5)
at SVGO.optimize (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:48:11)
at Through2._transform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:32:9)
at Through2.Transform._read (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Through2.Transform._write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
@ ./client/src/flow/ui/react/components/GameRow.js 35:19-55
ERROR in ./client/src/img/svg/trophy.svg
Module build failed: TypeError: Invalid non-string/buffer chunk
at chunkInvalid (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:421:10)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:176:12)
at DuplexWrapper.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:162:10)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/duplexer2/index.js:50:15)
at emitOne (events.js:77:13)
at Through2.emit (events.js:169:7)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:786:14)
at emitNone (events.js:67:13)
at Through2.emit (events.js:166:7)
at emitReadable_ (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
at emitReadable (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
at Through2.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
at Through2.Transform.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
at afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:101:12)
at TransformState.afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:48:5
at optimizeOnceCallback (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:43:17)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:65:9
at Object.sax.onend (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:140:26)
at emit (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:625:33)
at end (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:667:3)
at Object.write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:929:30)
at Object.SAXParser.close (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:153:38)
at module.exports (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:144:21)
at SVGO._optimizeOnce (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:56:5)
at SVGO.optimize (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:48:11)
at Through2._transform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:32:9)
at Through2.Transform._read (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Through2.Transform._write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
@ ./client/src/flow/ui/react/components/HeaderCharms.js 38:20-57
ERROR in ./client/src/img/svg/move.svg
Module build failed: TypeError: Invalid non-string/buffer chunk
at chunkInvalid (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:421:10)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:176:12)
at DuplexWrapper.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:162:10)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/duplexer2/index.js:50:15)
at emitOne (events.js:77:13)
at Through2.emit (events.js:169:7)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:786:14)
at emitNone (events.js:67:13)
at Through2.emit (events.js:166:7)
at emitReadable_ (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
at emitReadable (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
at Through2.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
at Through2.Transform.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
at afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:101:12)
at TransformState.afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:48:5
at optimizeOnceCallback (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:43:17)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:65:9
at Object.sax.onend (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:140:26)
at emit (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:625:33)
at end (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:667:3)
at Object.write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:929:30)
at Object.SAXParser.close (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:153:38)
at module.exports (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:144:21)
at SVGO._optimizeOnce (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:56:5)
at SVGO.optimize (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:48:11)
at Through2._transform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:32:9)
at Through2.Transform._read (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Through2.Transform._write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
@ ./client/src/flow/ui/react/components/HeaderCharms.js 32:18-53
ERROR in ./client/src/img/svg/message.svg
Module build failed: TypeError: Invalid non-string/buffer chunk
at chunkInvalid (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:421:10)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:176:12)
at DuplexWrapper.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:162:10)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/duplexer2/index.js:50:15)
at emitOne (events.js:77:13)
at Through2.emit (events.js:169:7)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:786:14)
at emitNone (events.js:67:13)
at Through2.emit (events.js:166:7)
at emitReadable_ (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
at emitReadable (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
at Through2.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
at Through2.Transform.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
at afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:101:12)
at TransformState.afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:48:5
at optimizeOnceCallback (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:43:17)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:65:9
at Object.sax.onend (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:140:26)
at emit (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:625:33)
at end (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:667:3)
at Object.write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:929:30)
at Object.SAXParser.close (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:153:38)
at module.exports (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:144:21)
at SVGO._optimizeOnce (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:56:5)
at SVGO.optimize (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:48:11)
at Through2._transform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:32:9)
at Through2.Transform._read (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Through2.Transform._write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
@ ./client/src/flow/ui/react/components/HeaderCharms.js 44:21-59
ERROR in ./client/src/img/svg/circle.svg
Module build failed: TypeError: Invalid non-string/buffer chunk
at chunkInvalid (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:421:10)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:176:12)
at DuplexWrapper.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:162:10)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/stream-combiner2/node_modules/duplexer2/index.js:50:15)
at emitOne (events.js:77:13)
at Through2.emit (events.js:169:7)
at Through2.<anonymous> (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:786:14)
at emitNone (events.js:67:13)
at Through2.emit (events.js:166:7)
at emitReadable_ (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
at emitReadable (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
at readableAddChunk (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
at Through2.Readable.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
at Through2.Transform.push (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
at afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:101:12)
at TransformState.afterTransform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:48:5
at optimizeOnceCallback (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:43:17)
at /Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:65:9
at Object.sax.onend (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:140:26)
at emit (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:625:33)
at end (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:667:3)
at Object.write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:929:30)
at Object.SAXParser.close (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/lib/sax.js:153:38)
at module.exports (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo/svg2js.js:144:21)
at SVGO._optimizeOnce (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:56:5)
at SVGO.optimize (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/lib/svgo.js:48:11)
at Through2._transform (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/imagemin-svgo/index.js:32:9)
at Through2.Transform._read (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Through2.Transform._write (/Users/matt/workspace/boardom/node_modules/imagemin/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
@ ./client/src/flow/ui/react/components/Status.js 29:20-57
Can the output folder of the minimized images be specified? What is the syntax? thx.
Loader work each time, when it starts.
How do i can add cache mechanism to images (like gulp-imagemin + gulp-newer or something similar)
Thank you)
DEPRECATED. Configure gifsicle's interlaced option in it's own options. (gifsicle.interlaced)
DEPRECATED. Configure optipng's optimizationLevel option in it's own options.
DEPRECATED. Configure gifsicle's interlaced option in it's own options. (gifsicle.interlaced)
DEPRECATED. Configure optipng's optimizationLevel option in it's own options.
DEPRECATED. Configure gifsicle's interlaced option in it's own options. (gifsicle.interlaced)
DEPRECATED. Configure optipng's optimizationLevel option in it's own options.
DEPRECATED. Configure gifsicle's interlaced option in it's own options. (gifsicle.interlaced)
DEPRECATED. Configure optipng's optimizationLevel option in it's own options.
DEPRECATED. Configure gifsicle's interlaced option in it's own options. (gifsicle.interlaced)
DEPRECATED. Configure optipng's optimizationLevel option in it's own options.
DEPRECATED. Configure gifsicle's interlaced option in it's own options. (gifsicle.interlaced)
DEPRECATED. Configure optipng's optimizationLevel option in it's own options.
DEPRECATED. Configure gifsicle's interlaced option in it's own options. (gifsicle.interlaced)
DEPRECATED. Configure optipng's optimizationLevel option in it's own options. (optipng.optimizationLevel)
I've set up my webpack 2 options like so to try and rectify this after it cropped up in the new version (it seems like the recommended way from the readme):
{
test: /\.(jpe?g|png|gif|svg)$/i,
loaders: ['file-loader?context=src/images&name=images/[path][name].[ext]', {
loader: 'image-webpack-loader',
query: {
progressive: true,
optimizationLevel: 4,
interlaced: false,
optipng: {
optimizationLevel: 4,
},
pngquant: {
quality: '75-90',
speed: 3,
},
},
}],
exclude: /node_modules/,
include: __dirname,
},
Tried adding that optipng
option there too, because it seems that's what the deprecations want, but no change.
Hello, seems I have a strange problem with webpack and the webpack-image-loader, maybe anyone can help?
The thing is, that when using both locally on Ubuntu, everything works as expected and images were written including file extensions such as .svg, jpg. and so on. But when using the same project on Debian, files were written without extensions and the bundle fails.
The config looks like this:
{
test: /\.(jpe?g|png|gif)$/i,
loaders: [
'file?hash=sha512&digest=hex&name=[hash].[ext]',
'image-webpack?{progressive:true, optimizationLevel: 7, interlaced: false, pngquant:{quality: "65-90", speed: 4}}'
]
}
Node v6 is giving warnings about old versions of graceful-fs, and it will break from v7. Updating the imagemin dependency would solve this.
├─┬ [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
Why?
node_modules
).require
, import
).I can do PR, but this major release. Also i can help with repo (#47).
My repo is at https://github.com/jpls93/js_modules. When adding the line import small from '../assets/small.jpg';
to src/image_viewer.js
and running npm run build
, I get the following error:
pat@pat:~/Desktop/js_modules$ npm run build
> [email protected] build /home/pat/Desktop/js_modules
> webpack
Hash: 773f3a0d1e83c841c2c9
Version: webpack 2.2.0-rc.3
Time: 1059ms
Asset Size Chunks Chunk Names
bundle.js 3.31 kB 0 [emitted] main
style.css 34 bytes 0 [emitted] main
[0] ./src/image_viewer.js 454 bytes {0} [built]
[1] ./styles/image_viewer.css 41 bytes {0} [built]
[2] ./src/index.js 41 bytes {0} [built]
[3] /home/pat/~/css-loader/lib/css-base.js 1.46 kB [built]
ERROR in ./src/image_viewer.js
Module not found: Error: Can't resolve 'image-webpack-loader' in '/home/pat/Desktop/js_modules'
@ ./src/image_viewer.js 3:13-43
@ ./src/index.js
Child extract-text-webpack-plugin:
[0] /home/pat/~/css-loader/lib/css-base.js 1.46 kB {0} [built]
[1] /home/pat/~/css-loader!./styles/image_viewer.css 199 bytes {0} [built]
Any help would be appreciated.
Thanks.
I've been using the image-webpack-loader
for a while but (only!) when loading gif
files with the this
{
test: /\.(png|gif|jpe?g|svg)$/i,
loaders: [
'url-loader?limit=1&name=img/[name].[ext]',
'image-webpack-loader?{progressive: true, optimizationLevel: 7, interlaced: false, pngquant: {quality: "65-90", speed: 4}}'
]
}
loader configuration, I get the following error that does not really help me at all:
Module build failed: TypeError: Cannot read property 'charCodeAt' of undefined
at isBinary (D:\MyDev\ljs_app\trunk\periscope\build\node_modules\is-svg\index.js:8:38)
at module.exports (D:\MyDev\ljs_app\trunk\periscope\build\node_modules\is-svg\index.js:19:10)
at buf (D:\MyDev\ljs_app\trunk\periscope\build\node_modules\imagemin-svgo\index.js:8:7)
at Imagemin.use (D:\MyDev\ljs_app\trunk\periscope\build\node_modules\image-webpack-loader\node_modules\imagemin\index.js:63:51)
at Object.module.exports (D:\MyDev\ljs_app\trunk\periscope\build\node_modules\image-webpack-loader\index.js:33:6)
@ ./libs/select2/select2.css 6:18424-18450
Any help would be appreciated.
Our build server is behind a corporate proxy. This results in timouts when npm trying to install gifsicle, mozjpeg and so on, all used by image-webpack-loader.
I've read that this can be solved somehow by using https://github.com/kevva/bin-wrapper
Any idea on how to solve this?
It's probably implied if you're knee deep in the es6-nowait-es2015-react-webpack-babel-wait-wasnt-it-6to5-traceur-dontforgetpolymer-riotjs-mithril-endless-js-but-no-angular-tooling-celebration-party that you need to have file-loader
already.
But you would the the coolest guy ever if you add npm install --save-dev file-loader
to the steps just in case someone didn't know.
Also jokes aside you are awesome, this loader works like a charm. 💯 Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.