Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Error: write EOF when bundling #240

Open
mperu92 opened this issue Jun 14, 2020 · 1 comment
Open

Error: write EOF when bundling #240

mperu92 opened this issue Jun 14, 2020 · 1 comment

Comments

@mperu92
Copy link

mperu92 commented Jun 14, 2020

I'm having this error when bundling jpg images using image-webpack-plugin

ERROR in ./wwwroot/images/gallery/15.JPG
Module build failed (from ./node_modules/image-webpack-loader/index.js):
Error: write EOF

I am using webpack v^4.43.0 and image-webpack-plugin v^6.0.0 and node v12.18.0;

This is my webpack.config.js config:

{
	test: /\.(gif|png|jpe?g|svg)$/i,
	loaders: [
		{
			loader: 'file-loader',
			options: {
				name: 'images/[name].[ext]'
			}
		},
		{
			loader: 'image-webpack-loader',
			options: {
				mozjpeg: {
					progressive: true,
					quality: 65
				},
				// optipng.enabled: false will disable optipng
				optipng: {
					enabled: false,
				},
				pngquant: {
					quality: [0.65, 0.90],
					speed: 4
				},
				gifsicle: {
					interlaced: false,
				},
				// the webp option will enable WEBP
				webp: {
					quality: 75
				}
			}
		},
	]
}
@Liqiuping
Copy link

Hi. if you were working in the mainland of PRC. you'd better uninstall image-webpack-loader and try to cnpm install image-webpack-loader. i came across the same trouble recently.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants