Coder Social home page Coder Social logo

imagemin-mozjpeg's Introduction

imagemin-mozjpeg

Imagemin plugin for mozjpeg

Install

$ npm install imagemin-mozjpeg

Usage

import imagemin from 'imagemin';
import imageminMozjpeg from 'imagemin-mozjpeg';

(async () => {
	await imagemin(['images/*.jpg'], {
		destination: 'build/images',
		plugins: [
			imageminMozjpeg()
		]
	});

	console.log('Images optimized');
})();

API

imageminMozjpeg(options?)(buffer)

Returns a Promise<Buffer>.

options

Type: object

quality

Type: number

Compression quality, in range 0 (worst) to 100 (perfect).

progressive

Type: boolean
Default: true

false creates baseline JPEG file.

targa

Type: boolean
Default: false

Input file is Targa format (usually not needed).

revert

Type: boolean
Default: false

Revert to standard defaults instead of mozjpeg defaults.

fastCrush

Type: boolean
Default: false

Disable progressive scan optimization.

dcScanOpt

Type: number
Default: 1

Set DC scan optimization mode.

  • 0 One scan for all components
  • 1 One scan per component
  • 2 Optimize between one scan for all components and one scan for 1st component plus one scan for remaining components
trellis

Type: boolean
Default: true

Trellis optimization.

trellisDC

Type: boolean
Default: true

Trellis optimization of DC coefficients.

tune

Type: string
Default: hvs-psnr

Set Trellis optimization method. Available methods: psnr, hvs-psnr, ssim, ms-ssim

overshoot

Type: boolean
Default: true

Black-on-white deringing via overshoot.

arithmetic

Type: boolean
Default: false

Use arithmetic coding.

dct

Type: string
Default: int

Set DCT method:

  • int Use integer DCT
  • fast Use fast integer DCT (less accurate)
  • float Use floating-point DCT
quantBaseline

Type: boolean
Default: false

Use 8-bit quantization table entries for baseline JPEG compatibility.

quantTable

Type: number

Use predefined quantization table.

  • 0 JPEG Annex K
  • 1 Flat
  • 2 Custom, tuned for MS-SSIM
  • 3 ImageMagick table by N. Robidoux
  • 4 Custom, tuned for PSNR-HVS
  • 5 Table from paper by Klein, Silverstein and Carney
smooth

Type: number

Set the strength of smooth dithered input. (1...100)

maxMemory

Type: number

Set the maximum memory to use in kilobytes.

sample

Type: string[]

Set component sampling factors. Each item should be in the format HxV, for example 2x1.

buffer

Type: buffer

Buffer to optimize.

imagemin-mozjpeg's People

Contributors

1000ch avatar kevva avatar rejas avatar shinnn avatar sindresorhus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imagemin-mozjpeg's Issues

Do I need to manually install mozjpeg?

First up, thanks to all imagemin developers for creating a great collection of npm modules.

Do I need to manually install mozjpeg before using this npm library? I'm trying to use the library with gulp and the gulp-imagemin package but can't get it to run properly.

Exif formatted jpeg errors

😃 FF D8 FF E0 00 10 4A 46 49 46 00 01 01 00 00 (JFIF header)
🤔 FF D8 FF E1 08 7E 45 78 69 66 00 00 4D 4D 00 (Exif header)

2 WARNINGS in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)

1 warning has detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.36.0 compiled with 4 warnings in 14593 ms

I don't know how to get a further warning or error message because the terminal fills up with gibberish presumably from it attempting to parse the Exif image.
This was a command I tried:
npx webpack --stats-children --stats-error-details

Incompatible library version: cjpeg

Hi,

I'm trying to run mozjpeg with gulp, but I get this error:

[00:13:17] Starting 'minify-jpgs'...

events.js:141
      throw er; // Unhandled 'error' event
      ^
Error: dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
  Referenced from: /Users/username/Documents/sites/website.com/node_modules/mozjpeg/vendor/cjpeg
  Reason: Incompatible library version: cjpeg requires version 36.0.0 or later, but libpng16.16.dylib provides version 27.0.0

    at ChildProcess.exithandler (child_process.js:203:12)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:817: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:469:12)

It manages to install ok, here is my task in full:

gulp.task("minify-jpgs", function(){
    return gulp.src([
        "./images/tester.jpg",
    ])
    .pipe(imagemin([
        imageminMozjpeg({
            progressive: true,
            quality: 80
        })
    ]))
    .pipe(gulp.dest("./images/mozjpeg"));
});

I am not sure what to do about this, can't find a similar issue anywhere. Do you have any suggestions?

Images being compressed to 0 bytes

Not sure if I am doing something wrong but my images are being compressed to nothing. I've tried both:

return gulp.src('src/img/*.jpg')
    .pipe(imagemin({
        use: [imageminMozjpeg()]
    }))
    .pipe(gulp.dest('dist/img'));

and

return gulp.src('src/img/*.jpg')
    .pipe(imageminMozjpeg()())
    .pipe(gulp.dest('dist/img'));

with the same results. When using imagemin I get the message "Minified 2 images (saved 374.3 kB - 100%)".

Let me know if you need any more info from me.

Quality in version 6

I have been using version 5.1 for some time and an image of 1mb can be reduced to about 30kb @ quality = 50.

When I upgrade to 6.0.0 the same settings output a file about 350kb

Fails to install on Arch Linux

npm install throws:

  ⚠ 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=4 && make install --jobs=4
Command failed: make install --jobs=4
/usr/bin/install: target 'website/node_modules/mozjpeg/vendor/libjpeg.la' is not a directory
make[2]: *** [Makefile:865: install-libLTLIBRARIES] Error 1
make[1]: *** [Makefile:2347: install-am] Error 2
make: *** [Makefile:2041: install-recursive] Error 1

    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)

Dependency update needed to address trim-newlines CVE-2021-33623

I was curious how this package was hoping to address CVE-2021-33623.

└─┬ [email protected] (current)
└─┬ [email protected] (current)
└─┬ [email protected] (current)
└─┬ [email protected] (current)
└─┬ [email protected] (2.0.0)
└─┬ [email protected] (10.0.1)
└── [email protected] (

squeak's package.json may want to update lpad-align to 2.*
lpad-align's 2.0.0 package.json still references meow 3.3
meow's 10.0.1 package.json requires the patched trim-newlines: "^4.0.1"

If lpad-align is able to update their meow dependency to the latest version 10^ then all should be well. But others may have better solutions. It appears there is an issue for lpad-align requesting an upgrade; however, the last commit to that repository was 4 years ago. lpad-align, squeak and logalot are all maintained by the same person @kevva. It's been several years since a commit on those repositories so they may be no longer actively maintained. I'll see if I can get in touch with @kevva and see if he has any interest in updating things.

If not, it may be best for mozjpeg to rework and drop the dependency upon logalot. Perhaps https://www.npmjs.com/package/better-logging would be a better solution. I will suggest that as a possibility on the mozjpeg project.

Hopefully this helps folks to consider the various options to resolving CVE-2021-33623 in this project.

Request to remove gulp-util using the following API replacements

gutil.File => https://www.npmjs.com/package/vinyl
gutil.replaceExtension => The .extname property on Vinyl objects or https://www.npmjs.com/package/replace-ext
gutil.colors => https://www.npmjs.com/package/ansi-colors
gutil.date => https://www.npmjs.com/package/date-format
gutil.log => https://www.npmjs.com/package/fancy-log
gutil.template => https://www.npmjs.com/package/lodash.template
gutil.env => https://www.npmjs.com/package/minimist
gutil.beep => https://www.npmjs.com/package/beeper
gutil.noop => https://www.npmjs.com/package/through2
gutil.isStream => Use the .isStream() method on Vinyl objects
gutil.isBuffer => Use the .isBuffer() method on Vinyl objects
gutil.isNull => Use the .isNull() method on Vinyl objects
gutil.linefeed => Use the string '\n' in your code
gutil.combine => https://www.npmjs.com/package/multipipe
gutil.buffer => https://www.npmjs.com/package/list-stream
gutil.PluginError => https://www.npmjs.com/package/plugin-error

Getting an error on Win 10

I've been trying to use this on Win 10.

My code:

const imagemin = require('imagemin')
const imageminMozjpeg = require('imagemin-mozjpeg')

async function init(from, dest) {
	try {
		await imagemin([from], {
			destination: dest,
			plugins: [ imageminMozjpeg({ quality: 80 }) ]
		})
	} catch(e) { console.error(e) }
}

init('media/test.jpg', 'media/optimized')

And I get this error:

{ TypeError: Command failed: I:\media-test\node_modules\mozjpeg\vendor\cjpeg.exe -quality 80
timedPromise.finally is not a function
    at setExitHandler (I:\media-test\node_modules\execa\lib\kill.js:102:29)
    at execa (I:\media-test\node_modules\execa\index.js:100:22)
    at I:\media-test\node_modules\imagemin-mozjpeg\index.js:109:25
    at I:\media-test\node_modules\p-pipe\index.js:12:25
    at handleFile (I:\media-test\node_modules\imagemin\index.js:21:54)
    at <anonymous>
  originalMessage: 'timedPromise.finally is not a function',
  shortMessage: 'Command failed: I:\\media-test\\node_modules\\mozjpeg\\vendor\\cjpeg.exe -quality 80\ntimedPromise.finally is not a function',
  command: 'I:\\media-test\\node_modules\\mozjpeg\\vendor\\cjpeg.exe -quality 80',
  exitCode: undefined,
  signal: undefined,
  signalDescription: undefined,
  stdout: <Buffer >,
  stderr: <Buffer >,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false }

I checked and I:\media-test\node_modules\mozjpeg\vendor\cjpeg.exe does exist, i tried to run this executable with no arguments and it worked to run it (although gave no output). I know the path to the image and the destination folder are also correct as the same code does work when I try it with imagemin-jpegtrans.

Any help would be appreciated.

npm 2.x + Docker = spawn .../mozjpeg/vendor/cjpeg ENOENT error

When running imagemin-mozjpeg in Docker (I suspect any linux) with npm 2.x
spawn ../imagemin-mozpeg/node_modules/mozjpeg/vendor/cjpeg ENOENT error is produced.

Quickly looking at this it looks like something like this happens:
With npm 2.x it tries to look for the vendor directory under ../imagemin-mozjpeg/node_modules/mozjpeg, which for some reason or not is not there. However, when switching to npm 3.x, it looks for the mozjpeg directly under main node_modules, where the vendor directory does exist.

Error building on windows :sad:

Hi i am trying to compressing jpg images on windows using this module and i am getting error as shown below :-

capture

{ Error: Error in file: C:/image-minifier-sqd/build/src/1469033655787.pic1.jpg

Command failed: C:\windows\system32\cmd.exe /s /c ""C:\image-minifier-sqd\node_modules\mozjpeg\vendor\cjpeg.exe" "-outfile" "C:\Users\gargt\AppData\Local\Temp\a22b0277-9e36-4a65-bc19-773cd07077ec" "C:\Users\gargt\AppData\Local\Temp\4023421b-4a6b-4bd4-8df3-6e38c4b579b6""

    at ChildProcess.exithandler (child_process.js:202:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at ChildProcess.cp.emit (C:\image-minifier-sqd\node_modules\cross-spawn-async\lib\enoent.js:37:29)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
  killed: false,
  code: 3221225477,
  signal: null,
  cmd: 'C:\\windows\\system32\\cmd.exe /s /c ""C:\\image-minifier-sqd\\node_modules\\mozjpeg\\vendor\\cjpeg.exe" "-outfile" "C:\\Users\\gargt\\AppData\\Local\\Temp\\a22b0277-9e36-4a65-bc19-773cd07077ec" "C:\\Users\\gargt\\AppData\\Local\\Temp\\4023421b-4a6b-4bd4-8df3-6e38c4b579b6""',
  stdout: '',
  stderr: '' }

My code for compressing image looks something like

const imageminOptions = [
                    imageminMozjpeg(),
                    imageminPngquant({speed: 10}),
                    imageminSvgo(),
                    imageminGifsicle()
                  ];


function compressImage(filePath, stream, next) {
  return imagemin([filePath], 'build/dest',{
    plugins: imageminOptions
  })
  .then(file => {
    log(`Compressed and saved at location ${file[0].path}`);
    stream.push(file[0].path);
    next();
  })
  .catch(console.error);
}

PS :- Using imagemin plugin described on npm, i can get only svg compressing work rest of them show same errors.

Request to remove gulp-util using the following API replacements

gutil.File => https://www.npmjs.com/package/vinyl
gutil.replaceExtension => The .extname property on Vinyl objects or https://www.npmjs.com/package/replace-ext
gutil.colors => https://www.npmjs.com/package/ansi-colors
gutil.date => https://www.npmjs.com/package/date-format
gutil.log => https://www.npmjs.com/package/fancy-log
gutil.template => https://www.npmjs.com/package/lodash.template
gutil.env => https://www.npmjs.com/package/minimist
gutil.beep => https://www.npmjs.com/package/beeper
gutil.noop => https://www.npmjs.com/package/through2
gutil.isStream => Use the .isStream() method on Vinyl objects
gutil.isBuffer => Use the .isBuffer() method on Vinyl objects
gutil.isNull => Use the .isNull() method on Vinyl objects
gutil.linefeed => Use the string '\n' in your code
gutil.combine => https://www.npmjs.com/package/multipipe
gutil.buffer => https://www.npmjs.com/package/list-stream
gutil.PluginError => https://www.npmjs.com/package/plugin-error

Mac vs Windows output different binaries/file size (Mac outputs larger file size)

I saw imagemin had a closed issue around this, but hopefully I have provided some more info. (I'll be continuing working on this myself)

I am sharing a Laravel product between Mac and Windows. When windows users run npm run production images have no change. When Mac run that same command image binary changes and image becomes a larger size (binary changes) and all image need to be commited.
Screen Shot 2020-10-12 at 7 10 05 PM


We use the same node and npm versions along with git config for line endings differences between Mac and Windows.

I believe the problem is within this plugin because changing the quality has no effect on the output image size on Mac (using latest beta version) but changing quality works on windows.

imageminMozjpeg({
    quality: 80
})

Option 'quality' has no effect

Test image:

original

Image size(original): 144 180 byte

Image size(quality 80-100): 137 114 byte 👍

Image size(quality 30-50): 137 114 byte 👎

Image size(quality 10-30): 137 114 byte 👎

Why does not deteriorate image quality and does not decrease its size when changing option 'quality'?

Remove gulp-util or update Pointers

remove gulp-util using the following API replacements:

gutil.File => https://www.npmjs.com/package/vinyl
gutil.replaceExtension => The .extname property on Vinyl objects or https://www.npmjs.com/package/replace-ext
gutil.colors => https://www.npmjs.com/package/ansi-colors
gutil.date => https://www.npmjs.com/package/date-format
gutil.log => https://www.npmjs.com/package/fancy-log
gutil.template => https://www.npmjs.com/package/lodash.template
gutil.env => https://www.npmjs.com/package/minimist
gutil.beep => https://www.npmjs.com/package/beeper
gutil.noop => https://www.npmjs.com/package/through2
gutil.isStream => Use the .isStream() method on Vinyl objects
gutil.isBuffer => Use the .isBuffer() method on Vinyl objects
gutil.isNull => Use the .isNull() method on Vinyl objects
gutil.linefeed => Use the string '\n' in your code
gutil.combine => https://www.npmjs.com/package/multipipe
gutil.buffer => https://www.npmjs.com/package/list-stream
gutil.PluginError => https://www.npmjs.com/package/plugin-error

zero byte files when using mozjpeg

Seem to be experiencing an earlier reported issue with mozjpeg zero-byting files... using grunt-contrib-imagemin 1.0.0 and imagemin-mozjpeg 5.1.0

When installing I get the error /temp/node_modules/mozjpeg/vendor/cjpeg` binary doesn't seem to work correctly. Compiling from source reports it builds successfully.

Have swapped to jpegoptim in gruntfile and works as intended, however compression is nowhere as good as mozjpeg.

How to use recent releases with gulp?

I pipe a gulp/vinyl stream into imagemin-mozjpeg and this worked until the recent releases.
Are there any examples on how to use the new probably changed API with gulp?

Fails to install on Windows 7

npm install --save imagemin-mozjpeg throws:

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\DELL\AppData
Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "--save" "imagemin-m
ozjpeg"
npm ERR! node v4.4.7
npm ERR! npm v3.10.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: node lib/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node lib/install.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 mozjpeg package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node lib/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs mozjpeg
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls mozjpeg
npm ERR! There is likely additional logging output above.

Not working on FreeBSD

Hello,
I am trying to build a Webpack bundle for my Phoenix project, and for research I decided to give it a shot on FreeBSD.
My application repo is on Gitlab, the webpack bundle is in assets/ directory.
I have installed mozjpeg from BSD ports, and there is a cjpeg binary available:

$ cjpeg -V
Independent JPEG Group's CJPEG, version 8d  15-Jan-2012
Copyright (C) 2012, Thomas G. Lane, Guido Vollbeding

I know that mozjpeg is available in some way, because image-webpack-loader can use it and produces almost the same images as on my OSX machine. However, image-webpack-loader seems to only work with images that are imported in CSS, such as with background-image, and it doesn't optimise images copied over using CopyWebpackPlugin. I can't get these settings to run in Webpack on FreeBSD (Linux and OSX are fine):

  plugins: [
    new MiniCssExtractPlugin({ filename: "../css/app.css" }),
    new CopyWebpackPlugin([{ from: "static/", to: "../" }]),
    new ImageminPlugin({
      test: /\.(jpe?g|png|gif|svg)$/i,
      plugins: [
        imageminMozjpeg({
          quality: 80,
          progressive: true
        })
      ]
    })
  ]

The first error is that there is no cjpeg binary in vendor/:

freebsd:~/dw-taiwan/assets$ yarn deploy
yarn run v1.17.3
$ webpack --mode production
Error: spawn /usr/home/deploy/dw-taiwan/assets/node_modules/mozjpeg/vendor/cjpeg ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

When I create a symbolic link to the cjpeg binary installed in the system, it's no good either:

freebsd:~/dw-taiwan/assets$ ln -s /usr/local/bin/cjpeg /home/deploy/dw-taiwan/assets/node_modules/mozjpeg/vendor/cjpeg                       1
freebsd:~/dw-taiwan/assets$ yarn deploy
yarn run v1.17.3
$ webpack --mode production
Error: Unrecognized input file format --- perhaps you need -targa

    at /usr/home/deploy/dw-taiwan/assets/node_modules/execa/index.js:231:11
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Any suggestions on how this could be solved? I am really curious about FreeBSD and I hope I could help fix this problem.
Best regards,
KM

installation fails on OS X

Related imagemin/mozjpeg-bin#16

npm i imagemin-mozjpeg
npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead!

> [email protected] postinstall /Users/me/project/node_modules/mozjpeg
> node lib/install.js

  ⚠ The `/Users/me/project/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="/Users/me/project/node_modules/mozjpeg/vendor" --bindir="/Users/me/project/node_modules/mozjpeg/vendor" --libdir="/Users/me/project/node_modules/mozjpeg/vendor" && make --jobs=4 && make install --jobs=4
Command failed: autoreconf -fiv
/bin/sh: autoreconf: command not found

    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:850:16)
    at Socket.<anonymous> (internal/child_process.js:323:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:492:12)

Example in readme does not work with imagemin v7

Hi

With the v7 release Imagemin introduced some breaking changes to the public API which means the example code in the readme no longer works.

I think the example in the readme should be updated so that it works with the latest major imagemin version or provide two examples, one for v7 and one for v6. If you think this is a good idea I'd be happy to submit a PR!

Error Installing Plugin Grunt 0.4.5

Hi there,

I was trying to install this plugin on Grunt 0.4.5 version, but I can't. Some problems with fstream.

Please check the print screen attached.

error-imagemin-mozjpeg-stream

Could you please check it?

Thanks.

"Unknown system error -86" when building on Apple Silicon

If this is a real issue, I have an Apple Silicon Mac and would like to help.


On Apple Silicon (arm64/arm64-apple-macos11) the build pre-test fails with the following trace:

0 verbose cli [
0 verbose cli   '/opt/homebrew/Cellar/node/15.11.0/bin/node',
0 verbose cli   '/opt/homebrew/bin/npm',
0 verbose cli   'install',
0 verbose cli   'mozjpeg'
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/opt/homebrew/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 0ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:/[...]/.npmrc Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:/Users/[...]/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/opt/homebrew/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 4ms
19 verbose npm-session 3dfece65973d12cd
20 timing npm:load Completed in 10ms
21 timing arborist:ctor Completed in 0ms
22 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules
23 timing idealTree:init Completed in 267ms
24 timing idealTree:userRequests Completed in 2ms
25 silly idealTree buildDeps
26 silly fetch manifest mozjpeg@*
27 http fetch GET 304 https://registry.npmjs.org/mozjpeg 506ms (from cache)
28 silly placeDep ROOT [email protected] OK for: [email protected] want: *
29 timing idealTree:#root Completed in 512ms
30 timing idealTree:node_modules/mozjpeg Completed in 0ms
31 timing idealTree:buildDeps Completed in 512ms
32 timing idealTree:fixDepFlags Completed in 4ms
33 timing idealTree Completed in 793ms
34 timing reify:loadTrees Completed in 795ms
35 timing reify:diffTrees Completed in 13ms
36 silly reify moves {}
37 timing reify:retireShallow Completed in 0ms
38 timing reify:createSparse Completed in 0ms
39 timing reify:loadBundles Completed in 0ms
40 timing reifyNode:node_modules/imagemin-optipng Completed in 25ms
41 timing reifyNode:node_modules/mozjpeg Completed in 29ms
42 timing reifyNode:node_modules/optipng-bin Completed in 30ms
43 timing reify:unpack Completed in 30ms
44 timing reify:unretire Completed in 0ms
45 timing build:queue Completed in 1ms
46 timing build:link:node_modules/mozjpeg Completed in 0ms
47 timing build:link:node_modules/optipng-bin Completed in 0ms
48 timing build:link Completed in 0ms
49 info run [email protected] postinstall node_modules/mozjpeg node lib/install.js
50 info run [email protected] postinstall node_modules/optipng-bin node lib/install.js
51 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 511ms
52 timing auditReport:getReport Completed in 513ms
53 timing metavuln:cache:get:security-advisory:marked:JjtyKgNaS05d2O5Se+mSj2PacQR5XJdOJBr/HXX1ZcwtaGUHc+6vChytTQM3xmL5a09+HewqHwMHONRUq1G2JQ== Completed in 25ms
54 timing metavuln:cache:get:security-advisory:clean-css:CieRffbE1nPyVol67lB6RtDImjfmW7zQ2s5sXvqm8/SQIVEQZKoBnBk0bcEvROmNVksCApCakQmyxPZs0AXNng== Completed in 26ms
55 timing metavuln:cache:get:security-advisory:minimist:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 24ms
56 timing metavuln:cache:get:security-advisory:braces:KNqjr1CE0QC68S3zOEsplFbBx/OoDhCB5eW9YqBWUKIt+akMhIivd+sGFIcKkRpAVktYb+ArnkYQx4siXgYJIg== Completed in 27ms
57 timing metavuln:cache:get:security-advisory:axios:nGn3vXHBr1MXdEUoCk2XqIzU8gDyqMJzOSF3bSVg7fKRpGqH686g8X7gNVmfdoD30lET3rsU8E009x0pQQVfAg== Completed in 28ms
58 http fetch GET 304 https://registry.npmjs.org/marked 185ms (from cache)
59 timing metavuln:packument:marked Completed in 185ms
60 timing metavuln:load:security-advisory:marked:1623 Completed in 1ms
61 timing metavuln:calculate:security-advisory:marked:1623 Completed in 186ms
62 http fetch GET 304 https://registry.npmjs.org/minimist 284ms (from cache)
63 timing metavuln:packument:minimist Completed in 285ms
64 timing metavuln:load:security-advisory:minimist:1179 Completed in 0ms
65 timing metavuln:calculate:security-advisory:minimist:1179 Completed in 285ms
66 http fetch GET 304 https://registry.npmjs.org/braces 291ms (from cache)
67 timing metavuln:packument:braces Completed in 291ms
68 timing metavuln:load:security-advisory:braces:786 Completed in 0ms
69 timing metavuln:calculate:security-advisory:braces:786 Completed in 292ms
70 http fetch GET 304 https://registry.npmjs.org/axios 293ms (from cache)
71 timing metavuln:packument:axios Completed in 293ms
72 timing metavuln:load:security-advisory:axios:1594 Completed in 1ms
73 timing metavuln:calculate:security-advisory:axios:1594 Completed in 295ms
74 http fetch GET 304 https://registry.npmjs.org/clean-css 319ms (from cache)
75 timing metavuln:packument:clean-css Completed in 321ms
76 timing metavuln:load:security-advisory:clean-css:785 Completed in 1ms
77 timing metavuln:calculate:security-advisory:clean-css:785 Completed in 322ms
78 timing metavuln:cache:get:security-advisory:access-sniff:ckr08O9SCv3gnRGkfkNACPdP12wq56H6eddPp15oxwwaEZpHGZqQs3GYQrZBGDpR5+14dky3g2le2Vr9hRYfOA== Completed in 2ms
79 http fetch GET 304 https://registry.npmjs.org/access-sniff 110ms (from cache)
80 timing metavuln:packument:access-sniff Completed in 110ms
81 timing metavuln:load:security-advisory:access-sniff:nGn3vXHBr1MXdEUoCk2XqIzU8gDyqMJzOSF3bSVg7fKRpGqH686g8X7gNVmfdoD30lET3rsU8E009x0pQQVfAg== Completed in 0ms
82 timing metavuln:calculate:security-advisory:access-sniff:nGn3vXHBr1MXdEUoCk2XqIzU8gDyqMJzOSF3bSVg7fKRpGqH686g8X7gNVmfdoD30lET3rsU8E009x0pQQVfAg== Completed in 110ms
83 timing metavuln:cache:get:security-advisory:micromatch:6Hdv/9HSh6TBKC1CYoX9JqnyAi5q0f0pB+S19ia7Yf8EyYlIonIcYrhYYC32YnFFZoEyzbV98/lmmbf9qWq6jA== Completed in 1ms
84 http fetch GET 304 https://registry.npmjs.org/micromatch 67ms (from cache)
85 timing metavuln:packument:micromatch Completed in 67ms
86 timing metavuln:load:security-advisory:micromatch:KNqjr1CE0QC68S3zOEsplFbBx/OoDhCB5eW9YqBWUKIt+akMhIivd+sGFIcKkRpAVktYb+ArnkYQx4siXgYJIg== Completed in 0ms
87 timing metavuln:calculate:security-advisory:micromatch:KNqjr1CE0QC68S3zOEsplFbBx/OoDhCB5eW9YqBWUKIt+akMhIivd+sGFIcKkRpAVktYb+ArnkYQx4siXgYJIg== Completed in 67ms
88 timing metavuln:cache:get:security-advisory:gulp-cssmin:zpp9vwWjftjJcyOnbmEVF6q9ZhBNaAXmBoJwFb51nH90PG4wsxEpNTZ160beH36Pp+GGcsrcxYNu90QYVQ2g1A== Completed in 4ms
89 http fetch GET 304 https://registry.npmjs.org/gulp-cssmin 75ms (from cache)
90 timing metavuln:packument:gulp-cssmin Completed in 75ms
91 timing metavuln:load:security-advisory:gulp-cssmin:CieRffbE1nPyVol67lB6RtDImjfmW7zQ2s5sXvqm8/SQIVEQZKoBnBk0bcEvROmNVksCApCakQmyxPZs0AXNng== Completed in 0ms
92 timing metavuln:calculate:security-advisory:gulp-cssmin:CieRffbE1nPyVol67lB6RtDImjfmW7zQ2s5sXvqm8/SQIVEQZKoBnBk0bcEvROmNVksCApCakQmyxPZs0AXNng== Completed in 76ms
93 timing metavuln:cache:get:security-advisory:panini:jpmuyLwykZhmRjrpb0hOl3sis/eRonHtJQg1GEYmujvk4L/Br508pDMe+hdwzi9uT5b3Wj5lRkz72xAnj2S6wA== Completed in 1ms
94 http fetch GET 304 https://registry.npmjs.org/panini 332ms (from cache)
95 timing metavuln:packument:panini Completed in 333ms
96 timing metavuln:load:security-advisory:panini:JjtyKgNaS05d2O5Se+mSj2PacQR5XJdOJBr/HXX1ZcwtaGUHc+6vChytTQM3xmL5a09+HewqHwMHONRUq1G2JQ== Completed in 0ms
97 timing metavuln:calculate:security-advisory:panini:JjtyKgNaS05d2O5Se+mSj2PacQR5XJdOJBr/HXX1ZcwtaGUHc+6vChytTQM3xmL5a09+HewqHwMHONRUq1G2JQ== Completed in 333ms
98 timing metavuln:cache:get:security-advisory:csscomb:P6FHjBfa9ieh71aVyT+n7gktibDk6+5oc/BndPOeBxUZW8ccLf9q0Z0DAqL07WKPCI0yCqIM5LBk+i90DiN57g== Completed in 15ms
99 timing metavuln:cache:get:security-advisory:gonzales-pe:MjZa4Y9I8jNWuvHjGgs3apEbk6cW9A9nlY70cTi38pUB1D7VFPlP4PuGDSLsHlxgl+B8Byr2HaGCwaCuoilyxw== Completed in 16ms
100 timing metavuln:cache:get:security-advisory:gonzales-pe-sl:mRvnbV354L7Wg2VJ4/MznH8Tjzdm2Ip685pBru3UdjkSuAUNWrNd3nMoFMQAOWzKd6pNCMeKkNkoVGbOVDSGNA== Completed in 16ms
101 timing metavuln:cache:get:security-advisory:gulp-util:kdVUBCpcnd5mKKx0BdoPIHqRdxVJR5/iEPe+l1v3nPmDXN4eDiye9gp2ro2prgaXhfdKx9ckLUpleh8VkF2zCw== Completed in 15ms
102 timing metavuln:cache:get:security-advisory:blocking-proxy:esfR0TLdsWb4wf/9LDLcjtkSUllycRtQTFo2mGXWmlscDFJfZmFY7iQobbSYjQxlrGP3jfyc6IQo7BTqULOnoQ== Completed in 15ms
103 timing metavuln:cache:get:security-advisory:rc:5CaxaUsjK4hm5YGxZdsHBERbkhg2ayjB1F7KkltT/spva+03R7PxDydCg1iRXZrD/kq/c4RheFJZFfjh0Cjw0w== Completed in 14ms
104 timing metavuln:cache:get:security-advisory:webdriver-manager:HQCnPZRKdILckzoAQd3V1wbzPjI/Nfk7ytZNBwDDoZ+E0tGJxD9GGk/6Juss2R+0w15bnYsjFfa3hshtBnGxRA== Completed in 14ms
105 timing metavuln:cache:get:security-advisory:meow:77nL6GjRTgs6PsZG9tit194Ki9THziHyRIcjBSdroet8DrYHx5VMZREYspMrKEYQf7FYG0Oh5nw/4kAKIyk2eg== Completed in 15ms
106 http fetch GET 304 https://registry.npmjs.org/csscomb 63ms (from cache)
107 timing metavuln:packument:csscomb Completed in 63ms
108 timing metavuln:load:security-advisory:csscomb:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 0ms
109 timing metavuln:calculate:security-advisory:csscomb:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 63ms
110 http fetch GET 304 https://registry.npmjs.org/gonzales-pe-sl 64ms (from cache)
111 timing metavuln:packument:gonzales-pe-sl Completed in 64ms
112 timing metavuln:load:security-advisory:gonzales-pe-sl:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 0ms
113 timing metavuln:calculate:security-advisory:gonzales-pe-sl:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 64ms
114 http fetch GET 304 https://registry.npmjs.org/gonzales-pe 68ms (from cache)
115 timing metavuln:packument:gonzales-pe Completed in 69ms
116 timing metavuln:load:security-advisory:gonzales-pe:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 0ms
117 timing metavuln:calculate:security-advisory:gonzales-pe:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 69ms
118 http fetch GET 304 https://registry.npmjs.org/blocking-proxy 81ms (from cache)
119 timing metavuln:packument:blocking-proxy Completed in 81ms
120 timing metavuln:load:security-advisory:blocking-proxy:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 0ms
121 timing metavuln:calculate:security-advisory:blocking-proxy:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 81ms
122 http fetch GET 304 https://registry.npmjs.org/webdriver-manager 83ms (from cache)
123 timing metavuln:packument:webdriver-manager Completed in 84ms
124 timing metavuln:load:security-advisory:webdriver-manager:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 0ms
125 timing metavuln:calculate:security-advisory:webdriver-manager:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 84ms
126 http fetch GET 304 https://registry.npmjs.org/rc 155ms (from cache)
127 timing metavuln:packument:rc Completed in 156ms
128 timing metavuln:load:security-advisory:rc:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 0ms
129 timing metavuln:calculate:security-advisory:rc:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 156ms
130 http fetch GET 304 https://registry.npmjs.org/meow 167ms (from cache)
131 timing metavuln:packument:meow Completed in 167ms
132 timing metavuln:load:security-advisory:meow:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 0ms
133 timing metavuln:calculate:security-advisory:meow:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 167ms
134 http fetch GET 304 https://registry.npmjs.org/gulp-util 170ms (from cache)
135 timing metavuln:packument:gulp-util Completed in 171ms
136 timing metavuln:load:security-advisory:gulp-util:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 0ms
137 timing metavuln:calculate:security-advisory:gulp-util:8MDgP3O3yM8t8dcQHSMUtmH4UKJrKhWmsmV44L4YChIzoahEo+G6j24b+4BPItZck5h5zQFPFD39kOC/789lfA== Completed in 171ms
138 timing metavuln:cache:get:security-advisory:gulp-accessibility:5MYC3Mc3DKOrPqu+CDR/mG1Qrq7QwrsrN2B6ReJNRDTV2bhKJEL44FNwnkbqXlAHhGA83WkK61sUDLVZjAxqKA== Completed in 1ms
139 http fetch GET 304 https://registry.npmjs.org/gulp-accessibility 350ms (from cache)
140 timing metavuln:packument:gulp-accessibility Completed in 351ms
141 timing metavuln:load:security-advisory:gulp-accessibility:ckr08O9SCv3gnRGkfkNACPdP12wq56H6eddPp15oxwwaEZpHGZqQs3GYQrZBGDpR5+14dky3g2le2Vr9hRYfOA== Completed in 0ms
142 timing metavuln:calculate:security-advisory:gulp-accessibility:ckr08O9SCv3gnRGkfkNACPdP12wq56H6eddPp15oxwwaEZpHGZqQs3GYQrZBGDpR5+14dky3g2le2Vr9hRYfOA== Completed in 351ms
143 timing metavuln:cache:get:security-advisory:glob-stream:QqOEvOzFpuuhKFFzrVVKcoJy3vhGcamDwQ/yih73rsPsIUL/wThNua2KqIsEiMz18R4G4ko3WaOr0Tj4JhWGaw== Completed in 7ms
144 http fetch GET 304 https://registry.npmjs.org/glob-stream 65ms (from cache)
145 timing metavuln:packument:glob-stream Completed in 66ms
146 timing metavuln:load:security-advisory:glob-stream:6Hdv/9HSh6TBKC1CYoX9JqnyAi5q0f0pB+S19ia7Yf8EyYlIonIcYrhYYC32YnFFZoEyzbV98/lmmbf9qWq6jA== Completed in 0ms
147 timing metavuln:calculate:security-advisory:glob-stream:6Hdv/9HSh6TBKC1CYoX9JqnyAi5q0f0pB+S19ia7Yf8EyYlIonIcYrhYYC32YnFFZoEyzbV98/lmmbf9qWq6jA== Completed in 66ms
148 timing metavuln:cache:get:security-advisory:sass-lint:DDAy08tuIYyRruMtKNwLYBuuKxtQBU/QclJqlDQhx8oDuJXRIJ4pRFkR4b+Dkuh0X7WSeDFPuiUJHO44lpu77w== Completed in 3ms
149 http fetch GET 304 https://registry.npmjs.org/sass-lint 64ms (from cache)
150 timing metavuln:packument:sass-lint Completed in 64ms
151 timing metavuln:load:security-advisory:sass-lint:mRvnbV354L7Wg2VJ4/MznH8Tjzdm2Ip685pBru3UdjkSuAUNWrNd3nMoFMQAOWzKd6pNCMeKkNkoVGbOVDSGNA== Completed in 0ms
152 timing metavuln:calculate:security-advisory:sass-lint:mRvnbV354L7Wg2VJ4/MznH8Tjzdm2Ip685pBru3UdjkSuAUNWrNd3nMoFMQAOWzKd6pNCMeKkNkoVGbOVDSGNA== Completed in 64ms
153 timing metavuln:cache:get:security-advisory:csscomb:hM3iqlHtzEtu9+SBnA2iFmq3enyNJojQ5xQTMoM4dRvqxRECdLJ51ikFYAdTNJO95TlDIfXoFsv9FiaDxMmV0A== Completed in 2ms
154 timing metavuln:load:security-advisory:csscomb:MjZa4Y9I8jNWuvHjGgs3apEbk6cW9A9nlY70cTi38pUB1D7VFPlP4PuGDSLsHlxgl+B8Byr2HaGCwaCuoilyxw== Completed in 0ms
155 timing metavuln:calculate:security-advisory:csscomb:MjZa4Y9I8jNWuvHjGgs3apEbk6cW9A9nlY70cTi38pUB1D7VFPlP4PuGDSLsHlxgl+B8Byr2HaGCwaCuoilyxw== Completed in 2ms
156 timing metavuln:cache:get:security-advisory:vinyl-fs:zdz5n9CaC2nd6L+CoM7FNmiDfUA63Xu6+5fk04xBd19Q9Eoi69wHvPRX9MQbT00MVEGzBkA5eo1zreaPtUJxrw== Completed in 2ms
157 http fetch GET 304 https://registry.npmjs.org/vinyl-fs 83ms (from cache)
158 timing metavuln:packument:vinyl-fs Completed in 85ms
159 timing metavuln:load:security-advisory:vinyl-fs:QqOEvOzFpuuhKFFzrVVKcoJy3vhGcamDwQ/yih73rsPsIUL/wThNua2KqIsEiMz18R4G4ko3WaOr0Tj4JhWGaw== Completed in 0ms
160 timing metavuln:calculate:security-advisory:vinyl-fs:QqOEvOzFpuuhKFFzrVVKcoJy3vhGcamDwQ/yih73rsPsIUL/wThNua2KqIsEiMz18R4G4ko3WaOr0Tj4JhWGaw== Completed in 85ms
161 timing metavuln:cache:get:security-advisory:gulp-sass-lint:YqZipIDki12CVk3y20cm7SOD6LTOQrs9C1uyqOdAmVbS92VZetkrVeg91z2rgYKjYClFdE9lppXcV2yefEmVaw== Completed in 2ms
162 http fetch GET 304 https://registry.npmjs.org/gulp-sass-lint 458ms (from cache)
163 timing metavuln:packument:gulp-sass-lint Completed in 458ms
164 timing metavuln:load:security-advisory:gulp-sass-lint:DDAy08tuIYyRruMtKNwLYBuuKxtQBU/QclJqlDQhx8oDuJXRIJ4pRFkR4b+Dkuh0X7WSeDFPuiUJHO44lpu77w== Completed in 0ms
165 timing metavuln:calculate:security-advisory:gulp-sass-lint:DDAy08tuIYyRruMtKNwLYBuuKxtQBU/QclJqlDQhx8oDuJXRIJ4pRFkR4b+Dkuh0X7WSeDFPuiUJHO44lpu77w== Completed in 458ms
166 timing metavuln:cache:get:security-advisory:gulp-gh-pages:IQCrdKW6rGkQjfbiFamZzhQ8CHYnPGw71Xi/VbU/qfoUg2CX9e4ZihkZ6SbSXzC20cGWX7aEMOFElQ1mxlGyBg== Completed in 2ms
167 http fetch GET 304 https://registry.npmjs.org/gulp-gh-pages 485ms (from cache)
168 timing metavuln:packument:gulp-gh-pages Completed in 485ms
169 timing metavuln:load:security-advisory:gulp-gh-pages:zdz5n9CaC2nd6L+CoM7FNmiDfUA63Xu6+5fk04xBd19Q9Eoi69wHvPRX9MQbT00MVEGzBkA5eo1zreaPtUJxrw== Completed in 0ms
170 timing metavuln:calculate:security-advisory:gulp-gh-pages:zdz5n9CaC2nd6L+CoM7FNmiDfUA63Xu6+5fk04xBd19Q9Eoi69wHvPRX9MQbT00MVEGzBkA5eo1zreaPtUJxrw== Completed in 485ms
171 timing auditReport:init Completed in 2611ms
172 timing reify:audit Completed in 3124ms
173 info run [email protected] postinstall { code: 1, signal: null }
174 verbose reify failed optional dependency /[...]/node_modules/optipng-bin
175 silly reify mark deleted [
175 silly reify   '/[...]/node_modules/optipng-bin',
175 silly reify   '/[...]/node_modules/.bin/optipng'
175 silly reify ]
176 verbose reify failed optional dependency /[...]/node_modules/imagemin-optipng
177 silly reify mark deleted [
177 silly reify   '/[...]/node_modules/imagemin-optipng'
177 silly reify ]
178 timing build:run:postinstall:node_modules/optipng-bin Completed in 4347ms
179 info run [email protected] postinstall { code: 1, signal: null }
180 timing reify:rollback:createSparse Completed in 4ms
181 timing reify:rollback:retireShallow Completed in 0ms
182 timing command:install Completed in 9324ms
183 verbose stack Error: command failed
183 verbose stack     at ChildProcess.<anonymous> (/opt/homebrew/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
183 verbose stack     at ChildProcess.emit (node:events:378:20)
183 verbose stack     at maybeClose (node:internal/child_process:1067:16)
183 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
184 verbose pkgid [email protected]
185 verbose cwd /[...]
186 verbose Darwin 20.3.0
187 verbose argv "/opt/homebrew/Cellar/node/15.11.0/bin/node" "/opt/homebrew/bin/npm" "install" "mozjpeg"
188 verbose node v15.11.0
189 verbose npm  v7.6.2
190 error code 1
191 error path /[...]/node_modules/mozjpeg
192 error command failed
193 error command sh -c node lib/install.js
194 error ⚠ spawn Unknown system error -86
194 error   ⚠ mozjpeg pre-build test failed
194 error   ℹ compiling from source
194 error   ✖ Error: Command failed: /bin/sh -c ./configure --enable-static --disable-shared --disable-dependency-tracking --with-jpeg8 libpng_LIBS='/usr/local/lib/libpng16.a -lz' --enable-static --prefix="/[...]/node_modules/mozjpeg/vendor" --bindir="/[...]/node_modules/mozjpeg/vendor" --libdir="/[...]/node_modules/mozjpeg/vendor"
194 error ./configure: line 13595: PKG_PROG_PKG_CONFIG: command not found
194 error ./configure: line 13774: syntax error near unexpected token `libpng,'
194 error ./configure: line 13774: `PKG_CHECK_MODULES(libpng, libpng, HAVE_LIBPNG=1,'
194 error
194 error checking for a BSD-compatible install... /usr/bin/install -c
194 error checking whether build environment is sane... yes
194 error checking for a thread-safe mkdir -p... ./install-sh -c -d
194 error checking for gawk... no
194 error checking for mawk... no
194 error checking for nawk... no
194 error checking for awk... awk
194 error checking whether make sets $(MAKE)... yes
194 error checking whether make supports nested variables... yes
194 error checking whether make supports nested variables... (cached) yes
194 error checking whether make supports the include directive... yes (GNU style)
194 error checking for gcc... gcc
194 error checking whether the C compiler works... yes
194 error checking for C compiler default output file name... a.out
194 error checking for suffix of executables...
194 error checking whether we are cross compiling... no
194 error checking for suffix of object files... o
194 error checking whether we are using the GNU C compiler... yes
194 error checking whether gcc accepts -g... yes
194 error checking for gcc option to accept ISO C89... none needed
194 error checking whether gcc understands -c and -o together... yes
194 error checking dependency style of gcc... none
194 error checking how to run the C preprocessor... gcc -E
194 error checking for gcc... (cached) gcc
194 error checking whether we are using the GNU C compiler... (cached) yes
194 error checking whether gcc accepts -g... (cached) yes
194 error checking for gcc option to accept ISO C89... (cached) none needed
194 error checking whether gcc understands -c and -o together... (cached) yes
194 error checking dependency style of gcc... (cached) none
194 error checking for ar... ar
194 error checking the archiver (ar) interface... ar
194 error checking dependency style of gcc... none
194 error checking the archiver (ar) interface... (cached) ar
194 error checking build system type... aarch64-apple-darwin20.3.0
194 error checking host system type... aarch64-apple-darwin20.3.0
194 error checking how to print strings... printf
194 error checking for a sed that does not truncate output... /usr/bin/sed
194 error checking for grep that handles long lines and -e... /usr/bin/grep
194 error checking for egrep... /usr/bin/grep -E
194 error checking for fgrep... /usr/bin/grep -F
194 error checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
194 error checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
194 error checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
194 error checking the name lister (/usr/bin/nm -B) interface... BSD nm
194 error checking whether ln -s works... yes
194 error checking the maximum length of command line arguments... 786432
194 error checking how to convert aarch64-apple-darwin20.3.0 file names to aarch64-apple-darwin20.3.0 format... func_convert_file_noop
194 error checking how to convert aarch64-apple-darwin20.3.0 file names to toolchain format... func_convert_file_noop
194 error checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
194 error checking for objdump... objdump
194 error checking how to recognize dependent libraries... pass_all
194 error checking for dlltool... no
194 error checking how to associate runtime and link libraries... printf %s\n
194 error checking for archiver @FILE support... no
194 error checking for strip... strip
194 error checking for ranlib... ranlib
194 error checking command to parse /usr/bin/nm -B output from gcc object... ok
194 error checking for sysroot... no
194 error checking for a working dd... /bin/dd
194 error checking how to truncate binary pipes... /bin/dd bs=4096 count=1
194 error checking for mt... no
194 error checking if : is a manifest tool... no
194 error checking for dsymutil... dsymutil
194 error checking for nmedit... nmedit
194 error checking for lipo... lipo
194 error checking for otool... otool
194 error checking for otool64... no
194 error checking for -single_module linker flag... yes
194 error checking for -exported_symbols_list linker flag... yes
194 error checking for -force_load linker flag... yes
194 error checking for ANSI C header files... yes
194 error checking for sys/types.h... yes
194 error checking for sys/stat.h... yes
194 error checking for stdlib.h... yes
194 error checking for string.h... yes
194 error checking for memory.h... yes
194 error checking for strings.h... yes
194 error checking for inttypes.h... yes
194 error checking for stdint.h... yes
194 error checking for unistd.h... yes
194 error checking for dlfcn.h... yes
194 error checking for objdir... .libs
194 error checking if gcc supports -fno-rtti -fno-exceptions... yes
194 error checking for gcc option to produce PIC... -fno-common -DPIC
194 error checking if gcc PIC flag -fno-common -DPIC works... yes
194 error checking if gcc static flag -static works... no
194 error checking if gcc supports -c -o file.o... yes
194 error checking if gcc supports -c -o file.o... (cached) yes
194 error checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
194 error checking dynamic linker characteristics... darwin20.3.0 dyld
194 error checking how to hardcode library paths into programs... immediate
194 error checking whether stripping libraries is possible... yes
194 error checking if libtool supports shared libraries... yes
194 error checking whether to build shared libraries... no
194 error checking whether to build static libraries... yes
194 error checking whether ln -s works... yes
194 error checking size of size_t... 8
194 error checking whether compiler supports pointers to undefined structures... yes
194 error checking whether __SUNPRO_C is declared... no
194 error checking for pow in -lm... yes
194 error
194 error     at /[...]/node_modules/execa/index.js:231:11
194 error     at runMicrotasks (<anonymous>)
194 error     at processTicksAndRejections (node:internal/process/task_queues:94:5)
194 error     at async Promise.all (index 0)
195 verbose exit 1

unhandledRejection resulting in crash when compressing jpg

The .jpg file that it crashes with is attached. Before hitting this error, it had compressed approximately 100-125 images successfully. This could be a problem on my side of things, I am only using a try catch block as my error handling as there is no documentation that I could find that explained how else I should attempt this.
item-1gxfo9

This is my server output (pm2 logs) when mozjpeg crashes (using asterisks in place of relative paths and pm2 server names):

0|* | You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
0|* | Error: Command was killed with SIGKILL (Forced termination):
0|* | �����JFIF�������ExifII*
�2��� ���� � i�� � �����]SONY�DSC-HX80^� ^� � GIMP 2.10.182020:05:30 17:04:59PrintIM0300� � � ��� $����������"�� � � '����0�� � � 2������0230��������� � ���� � ��� �������/home///node_modules/mozjpeg/vendor/cjpeg -quality 40 -maxmemory 20000000
0|* | at makeError (/home///node_modules/imagemin-mozjpeg/node_modules/execa/lib/error.js:59:11)
0|* | at handlePromise (/home///node_modules/imagemin-mozjpeg/node_modules/execa/index.js:114:26)
0|* | at runMicrotasks ()
0|* | at processTicksAndRejections (internal/process/task_queues.js:97:5)
0|* | at async /home///node_modules/imagemin-mozjpeg/index.js:109:19
0|* | at async /home///node_modules/p-pipe/index.js:12:19
0|* | at async handleFile (/home///node_modules/imagemin/index.js:21:9)
0|* | at async /home///node_modules/imagemin/index.js:54:13
0|* | at async Promise.all (index 0)
0|* | at async /home///routes/admin.js:56:29

After this error, it begins logging binary (well the ascii interpretation of it at least)

And finally it fataly crashes the pm2 server to the point where I need to restart it using my ecosystem.config file (pm2 is not able to restart itself)

Other files this happens to appear to all have been edited with GIMP (including this one). This issue does not appear to occur when using a computer with gimp installed on it.

This image successfully compressed to webp using imagemin-webp, so I do believe that the error occurred in this package.

The server that is running (and crashing) is using Ubuntu 18.04 LTS and the most up to date nodejs LTS release. These are my dependencies from my package.json:

"dependencies": {
"bcryptjs": "^2.4.3",
"body-parser": "^1.19.0",
"co": "^4.6.0",
"cookie-parser": "^1.4.5",
"cropperjs": "^1.5.7",
"dotenv": "^8.2.0",
"ejs": "^3.1.3",
"express": "^4.17.1",
"express-validator": "^6.5.0",
"imagemin": "^7.0.1",
"imagemin-mozjpeg": "^9.0.0",
"imagemin-pngquant": "^8.0.0",
"imagemin-webp": "^6.0.0",
"jsonwebtoken": "^8.5.1",
"lazysizes": "^5.2.2",
"method-override": "^3.0.0",
"multer": "^1.4.2",
"mysql2": "^2.1.0",
"path": "^0.12.7"
}

Some .jpg files are not compressed good enough

webpack: 4.16.5
imagemin-mozjpeg: 6.0.0

I use your imagemin-mozjpeg to ensure that the Google speed test service gives a good rating for the quality of the photos. Most of the photos were compressed, but some of them are not good enough.

Example:
Origin 75,1Kb

imagemin-mozjpeg 50,2Kb (options: {quality: 65} )

Compressed by google 2,5Kb

What's wrong? :(

7.0.0 errors with EPIPE

We receive this error after updating to 7.0.0 on our ci server (Ubuntu 16)

Warning: Error: write EPIPE in file x.jpg

After downgrading to 6.0.0 it works again. It also works with newer version on macOS

Gruntfile.js

...
             imagemin: {
                options: {
                    optimizationLevel: 7,
                    progressive: true,
                    interlaced: true,
                    svgoPlugins: [
                        { removeTitle: true },
                        { removeDesc: { removeAny: true } },
                    ],
                    use: [
                        imageminMozjpeg({ quality: 80 }),
                        imageminPngcrush({ reduce: false }),
                    ],
                },
                static: {
                    files: [
                        {
                            expand: true,
                            src: [
                                'webroot/images/**/*.{png,jpg,gif,svg}',
                            ],
                        },
                    ],
                },
...

installed packages:

I guess it might be because of #16 which made it into 7.0.0 although it was reverted in #17, but the revert seems it was force pushed away or somehow else removed from history. Was that on purpose?

This is the image:

3sat

Security issues Vulnerability

Command npm audit returned the following list of errors with high severity:

  High            Arbitrary File Write                                          

  Package         decompress                                                    

  Patched in      No patch available                                            

  Dependency of   imagemin-mozjpeg [dev]                                                                

  Path            imagemin-mozjpeg > mozjpeg > bin-build > decompress      

  More info       https://npmjs.com/advisories/1217  



  High            Arbitrary File Write                                          

  Package         decompress                                                    

  Patched in      No patch available                                            

  Dependency of   imagemin-mozjpeg [dev]                                                                

  Path            imagemin-mozjpeg > mozjpeg > bin-build > download > decompress      

  More info       https://npmjs.com/advisories/1217  


  High            Arbitrary File Write                                          

  Package         decompress                                                    

  Patched in      No patch available                                            

  Dependency of   imagemin-mozjpeg [dev]                                       

  Path            imagemin-mozjpeg > mozjpeg > bin-wrapper > download > decompress                                                    

  More info       https://npmjs.com/advisories/1217 

Is there a chance to fix this problem?

Images being compressed to 0 bytes

I'm having the exact same issue as #4, only I'm running the latest OSX (I believe they were on 10.7).

It seems to be an issue at npm install and it affects any jpg I try.

At install I'm getting the following error (again, the same as #4)

> [email protected] postinstall /Users/me/Development/website/node_modules/imagemin-mozjpeg/node_modules/mozjpeg
> node lib/install.js

  ⚠ The `/Users/me/Development/website/node_modules/imagemin-mozjpeg/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="/Users/me/Development/website/node_modules/imagemin-mozjpeg/node_modules/mozjpeg/vendor" --bindir="/Users/me/Development/website/node_modules/imagemin-mozjpeg/node_modules/mozjpeg/vendor" --libdir="/Users/me/Development/website/node_modules/imagemin-mozjpeg/node_modules/mozjpeg/vendor" && make --jobs=8 && make install --jobs=8
Command failed: /bin/sh -c ./configure --disable-shared --prefix="/Users/me/Development/website/node_modules/imagemin-mozjpeg/node_modules/mozjpeg/vendor" --bindir="/Users/me/Development/website/node_modules/imagemin-mozjpeg/node_modules/mozjpeg/vendor" --libdir="/Users/me/Development/website/node_modules/imagemin-mozjpeg/node_modules/mozjpeg/vendor"
configure: error: installation or configuration problem: assembler cannot create object files.

    at ChildProcess.exithandler (child_process.js:751:12)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
[email protected] node_modules/imagemin-mozjpeg
├── [email protected]
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected])

I have tried to install it fresh, as well as from an existing package.json. I've also created a new directory and tried there.

Is there an Option to Default to Original Image Size if Resulting Image is Larger?

I have an image that's original size is say ~200KB. When processed with MozJPEG it's size jumps to ~300KB. I realize this is likely an issue with MozJPEG but as a short circuit of sorts, I'm curious to know if there's a way to use the original image if the processed image is larger. If there's someone familiar with the codebase that can offer a workaround, that would be much appreciated. If this is a feature that folks would be interested in, I can personally look in to it further!

Option to allow converting to JPEG from non-JPEG input formats

Currently all non-jpeg images are filtered out by:

        if (!isJpg(file.contents)) {
            cb(null, file);
            return;
        }

However, mozjpeg binary supports other input formats, such as PNG.
It would be great to have a convert option that does not filter other image formats.

Unable to handle capital letter JPG

When I look for files ending with *.jpg it works phenomenaly, But, when I try to use capital *.JPG the package crashes.

Haven't been able to figure out why yet. Although, both jpg and JPG files will be encountered to represent the very same file format.

I've also tried the squirly bracket syntax but it doesn't seem to help.

TL;DR - there should be a simple way (if not default) to make file name matching case insensitive.

TypeError: options.sample.join is not a function

Using v9.0.0 and trying to set "sample" option but getting a TypeError:

imagemin images/photo.jpg --plugin.mozjpeg.quality=75 --plugin.mozjpeg.sample=2x2

TypeError: options.sample.join is not a function
at /usr/lib/node_modules/imagemin-mozjpeg/index.js:106:39
at /usr/lib/node_modules/imagemin-cli/node_modules/p-pipe/index.js:12:25
at handleFile (/usr/lib/node_modules/imagemin-cli/node_modules/imagemin/index.js:21:54)
at async /usr/lib/node_modules/imagemin-cli/node_modules/imagemin/index.js:54:13
at async Promise.all (index 0)
at async run (/usr/lib/node_modules/imagemin-cli/cli.js:90:11)
at async /usr/lib/node_modules/imagemin-cli/cli.js:122:3

building mozjpeg Error

✗ Error: Command failed: 'autoreconf' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���

not working with node 15?

getting errors with node 15;

Running "copy:images" (copy) task
Created 6 directories, copied 12 files

Running "imagemin:default" (imagemin) task
Warning: Error: Command failed with ENOENT: /home/github-runner/actions-runner/_work/hypetraq/hypetraq/frontend/node_modules/mozjpeg/vendor/cjpeg
spawn /home/github-runner/actions-runner/_work/hypetraq/hypetraq/frontend/node_modules/mozjpeg/vendor/cjpeg ENOENT

 in file build/assets/images/backgrounds/error.jpg� Use --force to continue.

Aborted due to warnings.

Does not work with npm 2.x + Docker

I don't know why the previous issue was closed and locked, as this is (or at least should be) a proper issue.

Just tested one more time - With npm 2.x (which comes with the latest node.js LTS release, v. 4.4.7), no optimizations can be done, instead the following error is triggered.:

Error: spawn /usr/src/app/node_modules/imagemin-mozjpeg/node_modules/mozjpeg/vendor/cjpeg ENOENT

It appears that the /mozjpeg/vendor directory is not properly built under /imagemin-mozjpeg/node_modules, thus the error is triggered. However, if mozjpeg is added to the dependencies of the project, the module appears to work, which is similar to what happens with npm 3.x, since it tries to flatten the directory tree. However, this also means that imagemin-mozjpeg could break if different version of mozjpeg is included with the project already, which is when module child dependencies would be installed similarly to npm 2.x.

It was suggested in previous issue that I should use same binaries from host OS but since I'm running Windows, I can not and regardless one should not use same binaries from the host OS. Even node.js official onbuild Dockerfiles does separate install per container for a reason.

Issue in ubuntu versions 16.04 and above.

Looks like the package uses libpng12-0 as a dependency in ubuntu machines. But libpng12-0 is not available in versions greater than 16.04 . Since new pprojects are deployed in 18.04LTS and 20.04 LTS the compression does not work as they have a libping version more than 12. The module throws the error "error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory" . Please fix this

Prebuilt mozjpeg binary doesn't work with 7.0.0 on Ubuntu

Installing [email protected] logs mozjpeg pre-build test passed successfully, using [email protected] logs:

  ⚠ 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 --disable-dependency-tracking --with-jpeg8  --prefix="/.../node_modules/mozjpeg/vendor" --bindir="/.../node_modules/mozjpeg/vendor" --libdir="/.../node_modules/mozjpeg/vendor" && make -j8 && make install -j8
Command failed: ./configure --disable-shared --disable-dependency-tracking --with-jpeg8  --prefix="/.../node_modules/mozjpeg/vendor" --bindir="/.../node_modules/mozjpeg/vendor" --libdir="/.../node_modules/mozjpeg/vendor"
configure: error: no nasm (Netwide Assembler) found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.