image-webpack-loader
image-webpack-loader copied to clipboard
Module build failed: Error: spawn Unknown system error -8 . --> dockerizing app
Hello, I have this error
Module build failed: Error: spawn Unknown system error -8
at _errnoException (util.js:1024:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at Object.exports.spawn (child_process.js:502:9)
at module.exports (/app/node_modules/execa/index.js:139:26)
at fsP.writeFile.then (/app/node_modules/exec-buffer/index.js:35:15)
dockerizing with this configuration:
{
test: /\.png$/i,
exclude: /node_modules/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]?[sha512:hash:base64:7]',
},
},
{
loader: 'image-webpack-loader',
query: {
mozjpeg: {
progressive: true,
},
gifsicle: {
interlaced: false,
},
optipng: {
optimizationLevel: 7,
},
pngquant: {
quality: '0-30',
speed: 10,
},
},
},
],
},
In my local machine works perfect!!
Pretty outdated, but if anyone else stumbles on this by googling for similar errors; Make sure you are not copying node_modules from your host to the docker container in your Dockerfile.