Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Fault under Rosetta emulation, Node.js 14, M1 Max, macOS Monterey #3048

Closed
jpike88 opened this issue Jan 18, 2022 · 20 comments
Closed

Comments

@jpike88
Copy link

jpike88 commented Jan 18, 2022

Related issue:
ionic-team/capacitor-assets#272

Sharp is causing a segmentation fault when converting images on my Mac.

I have macOS Monterey, on an M1 Max chip.

When I download sharp locally and run npm test, I get:



> [email protected] test /Users/joshua/Projects/sharp
> npm run test-lint && npm run test-unit && npm run test-licensing


> [email protected] test-lint /Users/joshua/Projects/sharp
> semistandard && cpplint


> [email protected] test-unit /Users/joshua/Projects/sharp
> nyc --reporter=lcov --branches=99 mocha --slow=1000 --timeout=60000 ./test/unit/*.js



  Affine transform
    ✔ Applies identity matrix
    ✔ Applies resize affine matrix
    ✔ Resizes and applies affine transform
    1) Extracts and applies affine transform
    ✔ Rotates and applies affine transform
    2) Extracts, rotates and applies affine transform
    3) Applies affine transform with background color
    ✔ Applies affine transform with background color and output offsets
    4) Applies affine transform with background color and all offsets
    Invalid input
      ✔ Missing matrix
      ✔ Invalid 1d matrix
      ✔ Invalid 2d matrix
      ✔ Invalid options parameter type
      ✔ Invalid background color
      ✔ Invalid idx offset type
      ✔ Invalid idy offset type
      ✔ Invalid odx offset type
      ✔ Invalid ody offset type
      ✔ Invalid interpolator
    Interpolations
      5) Performs 2x upscale with nearest interpolation
      ✔ Performs 2x upscale with bilinear interpolation
      6) Performs 2x upscale with bicubic interpolation
      7) Performs 2x upscale with locallyBoundedBicubic interpolation
      ✔ Performs 2x upscale with nohalo interpolation
      8) Performs 2x upscale with vertexSplitQuadraticBasisSpline interpolation

  HTTP agent
    ✔ Without proxy
    ✔ HTTPS proxy with auth from HTTPS_PROXY
    ✔ HTTPS proxy with auth from HTTPS_PROXY using credentials containing special characters
    ✔ HTTP proxy without auth from npm_config_proxy

  Alpha transparency
sh: line 1: 79897 Segmentation fault: 11  npm run test-unit
npm ERR! Test failed.  See above for more details.

It's not random, the same tests fail each time.


  System:
    OS: macOS 12.1
    CPU: (10) x64 Apple M1 Max
    Memory: 160.91 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.18.1 - /usr/local/bin/node
    npm: 6.14.15 - /usr/local/bin/npm

@jpike88 jpike88 added the triage label Jan 18, 2022
@lovell
Copy link
Owner

lovell commented Jan 18, 2022

What's the output of running /usr/local/bin/node -p "process.arch" ?

Do you see the same problem if you checkout the main branch and run npm install && npm test?

@jpike88
Copy link
Author

jpike88 commented Jan 18, 2022

/usr/local/bin/node -p "process.arch" => x64

If I switch to main branch, do npm i, then npm test, I get lots of failures. However, no segmentation fault, it looks like tests suite ran to completion. @lovell


joshua@Macbooks-MacBook-Pro-3 sharp % npm test

> [email protected] test /Users/joshua/Projects/sharp
> npm run test-lint && npm run test-unit && npm run test-licensing


> [email protected] test-lint /Users/joshua/Projects/sharp
> semistandard && cpplint


> [email protected] test-unit /Users/joshua/Projects/sharp
> nyc --reporter=lcov --branches=99 mocha --slow=1000 --timeout=60000 ./test/unit/*.js



  Affine transform
    1) Applies identity matrix
    2) Applies resize affine matrix
    3) Resizes and applies affine transform
    4) Extracts and applies affine transform
    5) Rotates and applies affine transform
    6) Extracts, rotates and applies affine transform
    7) Applies affine transform with background color
    8) Applies affine transform with background color and output offsets
    9) Applies affine transform with background color and all offsets
    10) Animated image rejects
    Invalid input
      ✔ Missing matrix
      ✔ Invalid 1d matrix
      ✔ Invalid 2d matrix
      ✔ Invalid options parameter type
      ✔ Invalid background color
      ✔ Invalid idx offset type
      ✔ Invalid idy offset type
      ✔ Invalid odx offset type
      ✔ Invalid ody offset type
      ✔ Invalid interpolator
    Interpolations
      11) Performs 2x upscale with nearest interpolation
      12) Performs 2x upscale with bilinear interpolation
      13) Performs 2x upscale with bicubic interpolation
      14) Performs 2x upscale with locallyBoundedBicubic interpolation
      15) Performs 2x upscale with nohalo interpolation
      16) Performs 2x upscale with vertexSplitQuadraticBasisSpline interpolation

  HTTP agent
    ✔ Without proxy
    ✔ HTTPS proxy with auth from HTTPS_PROXY
    ✔ HTTPS proxy with auth from HTTPS_PROXY using credentials containing special characters
    ✔ HTTP proxy without auth from npm_config_proxy

  Alpha transparency
    17) Flatten to black
    18) Flatten to RGB orange
    19) Flatten to CSS/hex orange
    20) Flatten 16-bit PNG with transparency to orange
    21) Do not flatten
    22) Ignored for JPEG
    ✔ Flatten with options but without colour does not throw
    ✔ Flatten to invalid colour throws
    23) Enlargement with non-nearest neighbor interpolation shouldn’t cause dark edges
    24) Reduction with non-nearest neighbor interpolation shouldn’t cause dark edges
    25) Removes alpha from fixtures with transparency, ignores those without
    26) Ensures alpha from fixtures without transparency, ignores those with
    27) Valid ensureAlpha value used for alpha channel
    ✔ Invalid ensureAlpha value throws

  AVIF
    ✔ called without options does not throw an error
    28) can convert AVIF to JPEG
    29) can convert JPEG to AVIF
    30) can passthrough AVIF
    31) can convert animated GIF to non-animated AVIF

  Bandbool per-channel boolean operations
    32) and operation
    33) or operation
    34) eor operation
    35) sRGB image retains 3 channels
    ✔ Invalid operation
    ✔ Missing operation

  Blur
    36) specific radius 1
    37) specific radius 10
    38) specific radius 0.3
    39) mild blur
    ✔ invalid radius
    40) blurred image is smaller than non-blurred

  Boolean operation between two images
    41) and operation, file
    42) and operation, buffer
    43) and operation, raw
    44) or operation, file
    45) or operation, buffer
    46) or operation, raw
    47) eor operation, file
    48) eor operation, buffer
    49) eor operation, raw
    ✔ Invalid operation
    ✔ Invalid operation, non-string
    ✔ Missing input

  Clahe
    50) width 5 width 5 maxSlope 0
    51) width 5 width 5 maxSlope 5
    52) width 11 width 25 maxSlope 14
    53) width 50 width 50 maxSlope 0
    54) width 50 width 50 maxSlope 14
    55) width 100 width 50 maxSlope 3
    56) width 100 width 100 maxSlope 0
    ✔ invalid maxSlope
    ✔ invalid width
    ✔ invalid height
    ✔ invalid options object
    57) uses default maxSlope of 3

  Clone
    58) Read from Stream and write to multiple Streams
    ✔ Stream-based input attaches finish event listener to original
    ✔ Non Stream-based input does not attach finish event listeners

  Colour space conversion
    59) To greyscale
    60) To greyscale with gamma correction
    61) Not to greyscale
    62) Greyscale with single channel output
    63) From 1-bit TIFF to sRGB WebP
    64) From CMYK to sRGB
    65) From CMYK to sRGB with white background, not yellow
    66) From profile-less CMYK to sRGB
    67) From sRGB with RGB16 pipeline, resize with gamma, to sRGB
    68) Convert P3 to sRGB
    69) Passthrough P3
    ✔ Invalid pipelineColourspace input
    ✔ Invalid toColourspace input

  composite
    70) blend
    71) premultiplied true
    72) premultiplied false
    73) premultiplied absent
    74) multiple
    75) zero offset
    76) offset and gravity
    77) negative offset and gravity
    78) offset, gravity and tile
    79) offset and tile
    80) centre gravity should replicate correct number of tiles
    81) cutout via dest-in
    82) Allow offset beyond bottom/right edge
    numeric gravity
      83) center
      84) centre
      85) north
      86) east
      87) south
      88) west
      89) northeast
      90) southeast
      91) southwest
      92) northwest
    string gravity
      93) center
      94) centre
      95) north
      96) east
      97) south
      98) west
      99) northeast
      100) southeast
      101) southwest
      102) northwest
    tile and gravity
      103) center
      104) centre
      105) north
      106) east
      107) south
      108) west
      109) northeast
      110) southeast
      111) southwest
      112) northwest
    validation
      ✔ missing images
      ✔ invalid images
      ✔ missing input
      ✔ invalid blend
      ✔ invalid tile
      ✔ invalid premultiplied
      ✔ invalid left
      ✔ invalid top
      ✔ left but no top
      ✔ top but no left
      ✔ invalid gravity

  Convolve
    113) specific convolution kernel 1
    114) specific convolution kernel 2
    115) horizontal Sobel operator
    invalid kernel specification
      ✔ missing
      ✔ incorrect data format
      ✔ incorrect dimensions

  Extend
    116) extend all sides equally with RGB
    117) extend sides unequally with RGBA
    ✔ missing parameter fails
    ✔ negative fails
    ✔ invalid top fails
    ✔ invalid bottom fails
    ✔ invalid left fails
    ✔ invalid right fails
    ✔ can set all edges apart from right
    118) should add alpha channel before extending with a transparent Background
    119) PNG with 2 channels
    120) Premultiply background when compositing
    extend all sides equally via a single value
      121) JPEG
      122) Animated WebP

  Partial image extraction
    123) JPEG
    124) PNG
    125) WebP
    126) TIFF
    127) Before resize
    128) After resize and crop
    129) Before and after resize and crop
    130) Extract then rotate
    131) Rotate then extract
    132) Extract then rotate non-90 anagle
    133) Rotate then extract non-90 angle
    134) Rotate with EXIF mirroring then extract
    Animated WebP
      135) Before resize
      136) After resize
    Invalid parameters
      ✔ Undefined
      ✔ String top
      ✔ Non-integral left
      ✔ Negative width - negative
      ✔ Null height
      137) Bad image area
      using the legacy extract(top,left,width,height) syntax
        ✔ String top
        ✔ Non-integral left
        ✔ Negative width - negative
        ✔ Null height

  Image channel extraction
    138) Red channel
    139) Green channel
    140) Blue channel
    141) Blue channel by number
    142) With colorspace conversion
    143) Alpha from 16-bit PNG
    144) Alpha from 2-channel input
    ✔ Invalid channel number
    ✔ No arguments
    145) Non-existent channel

  failOnError
    146) handles truncated JPEG
    147) handles truncated PNG, emits warnings
    ✔ rejects invalid values
    148) returns errors to callback for truncated JPEG
    149) returns errors to callback for truncated PNG
    150) rejects promises for truncated JPEG
    151) handles stream-based input

  Test fixtures
    assertMaxColourDistance
      ✔ should throw an Error when images have a different number of channels
      ✔ should throw an Error when images have different dimensions
      ✔ should accept a zero threshold when comparing an image to itself
      ✔ should accept a numeric threshold for two different images

  Gamma correction
    152) value of 0.0 (disabled)
    153) value of 2.2 (default)
    154) value of 3.0
    155) input value of 2.2, output value of 3.0
    156) alpha transparency
    ✔ invalid first parameter value
    ✔ invalid second parameter value

  GIF input
    157) GIF Buffer to JPEG Buffer
    158) 2 channel GIF file to PNG Buffer
    159) Animated GIF first page to PNG
    160) Animated GIF all pages to PNG "toilet roll"
    161) GIF with reduced colours, no dither, low effort reduces file size
    ✔ invalid loop throws
    ✔ invalid delay throws
    ✔ invalid colour throws
    ✔ invalid effort throws
    ✔ invalid dither throws
    162) should work with streams when only animated is set
    163) should work with streams when only pages is set

  HEIF
    ✔ called without options does not throw an error
    ✔ valid quality does not throw an error
    ✔ invalid quality should throw an error
    ✔ non-numeric quality should throw an error
    ✔ valid lossless does not throw an error
    ✔ non-boolean lossless should throw an error
    ✔ valid compression does not throw an error
    ✔ unknown compression should throw an error
    ✔ invalid compression should throw an error
    ✔ valid effort does not throw an error
    ✔ out of range effort should throw an error
    ✔ invalid effort should throw an error
    ✔ valid speed does not throw an error
    ✔ out of range speed should throw an error
    ✔ invalid speed should throw an error
    ✔ invalid chromaSubsampling should throw an error
    ✔ valid chromaSubsampling does not throw an error

  Input/output
    164) Read from File and write to Stream
    165) Read from Buffer and write to Stream
    166) Read from Stream and write to File
    167) Read from Stream and write to Buffer
    168) Read from Stream and write to Buffer via Promise resolved with Buffer
    169) Read from Stream and write to Buffer via Promise resolved with Object
    170) Read from File and write to Buffer via Promise resolved with Buffer
    171) Read from File and write to Buffer via Promise resolved with Object
    172) Read from Stream and write to Stream
    173) Read from Uint8Array and write to Buffer
    174) Read from Uint8ClampedArray and output to Buffer
    175) Stream should emit info event
    176) Stream should emit close event
    177) Handle Stream to Stream error 
    178) Handle File to Stream error
    179) Readable side of Stream can start flowing after Writable side has finished
    ✔ Invalid sequential read option throws
    180) Sequential read, force JPEG
    181) Not sequential read, force JPEG
    182) Support output to jpg format
    183) Support output to tif format
    ✔ Fail when output File is input File
    ✔ Fail when output File is input File via Promise
    ✔ Fail when output File is input File (relative output, absolute input)
    ✔ Fail when output File is input File via Promise (relative output, absolute input)
    ✔ Fail when output File is input File (relative input, absolute output)
    ✔ Fail when output File is input File via Promise (relative input, absolute output)
    ✔ Fail when output File is empty
    ✔ Fail when output File is empty via Promise
    184) Fail when input is invalid Buffer
    185) Fail when input file path is missing
    186) Promises/A+
    ✔ Invalid output format
    187) File input with corrupt header fails gracefully
    188) Buffer input with corrupt header fails gracefully
    189) Stream input with corrupt header fails gracefully
    190) Input and output formats match when not forcing
    191) Can force output format with output chaining
    192) toFormat=JPEG takes precedence over WebP extension
    193) toFormat=WebP takes precedence over JPEG extension
    194) Load Vips V file
    195) Save Vips V file
    196) Fails when writing to missing directory
    197) Queue length change events
    198) Info event data
    Fail for unsupported input
      ✔ Undefined
      ✔ Null
      ✔ Numeric
      ✔ Boolean
      ✔ Error Object
    Output filename with unknown extension
      199) Match JPEG input
      200) Match PNG input
      201) Match WebP input
      202) Match TIFF input
      203) Force JPEG format for PNG input
    Switch off safety limits for PNG/SVG input
      ✔ Valid
      ✔ Invalid
    Limit pixel count of input image
      ✔ Invalid fails - negative
      ✔ Invalid fails - float
      ✔ Invalid fails - string
      204) Same size as input works
      205) Disabling limit works
      206) Enabling default limit works and fails with a large image
      207) Smaller than input fails
    Input options
      ✔ Option-less
      ✔ Ignore unknown attribute
      ✔ undefined with options fails
      ✔ null with options fails
      ✔ Non-Object options fails
      ✔ Invalid density: string
      ✔ Setting animated property updates pages property
      ✔ Invalid animated property throws
      ✔ Invalid page property throws
      ✔ Invalid pages property throws
      ✔ Valid level property
      ✔ Invalid level property (string) throws
      ✔ Invalid level property (negative) throws
      ✔ Valid subifd property
      ✔ Invalid subifd property (string) throws
      ✔ Invalid subifd property (float) throws
    create new image
      208) RGB
      209) RGBA
      ✔ Invalid channels
      ✔ Missing background

  Image channel insertion
    210) Grayscale to RGB, buffer
    211) Grayscale to RGB, file
    212) Grayscale to RGBA, buffer
    213) Grayscale to RGBA, file
    214) Grayscale to CMYK, buffers
    215) Join raw buffers to RGB
    216) Grayscale to RGBA, files, two arrays
    ✔ Invalid raw buffer description
    ✔ Invalid input
    ✔ No arguments

  JP2 output
    ✔ JP2 output should fail due to missing OpenJPEG
    ✔ JP2 file output should fail due to missing OpenJPEG

  JPEG
    217) JPEG quality
    218) Progressive JPEG image
    219) Without chroma subsampling generates larger file
    ✔ Invalid JPEG chromaSubsampling value throws error
    220) Trellis quantisation
    221) Overshoot deringing
    222) Optimise scans generates different output length
    223) Optimise coding generates smaller output length
    224) Specifying quantisation table provides different JPEG
    225) Specifying quantization table provides different JPEG
    226) Can use mozjpeg defaults
    ✔ Invalid mozjpeg value throws error
    Invalid JPEG quality
      ✔ -1
      ✔ 88.2
      ✔ test
    Invalid JPEG quantisation table
      ✔ -1
      ✔ 88.2
      ✔ test

  libvips binaries
    Windows platform
      ✔ pkgConfigPath returns empty string
      ✔ globalLibvipsVersion returns empty string
      ✔ globalLibvipsVersion is always false
    non-Windows platforms
      ✔ pkgConfigPath returns a string
      ✔ globalLibvipsVersion returns a string
      ✔ globalLibvipsVersion returns a boolean
    platform agnostic
      ✔ minimumLibvipsVersion returns a valid semver
      ✔ hasVendoredLibvips returns a boolean
      ✔ useGlobalLibvips can be ignored via an env var
      ✔ cachePath returns a valid path ending with _libvips
    integrity
      ✔ reads value from environment variable
      ✔ reads value from package.json
    safe directory creation
      ✔ mkdirSync creates a directory
      ✔ mkdirSync does not throw error or overwrite an existing dir
    logger
      ✔ logs an info message
      ✔ logs an error message

  Linear adjustment
    227) applies linear levels adjustment w/o alpha ch
    228) applies slope level adjustment w/o alpha ch
    229) applies offset level adjustment w/o alpha ch
    230) applies linear levels adjustment w alpha ch
    231) applies slope level adjustment w alpha ch
    232) applies offset level adjustment w alpha ch
    ✔ Invalid linear arguments

  Median filter
    233) 1x1 window
    234) 3x3 window
    235) 7x7 window
    236) default window (3x3)
    ✔ invalid radius

  Image metadata
    ✔ JPEG
    ✔ JPEG with EXIF/ICC
    ✔ JPEG with IPTC/XMP
    ✔ TIFF
    ✔ Multipage TIFF
    ✔ PNG
    ✔ Transparent PNG
    ✔ WebP
    ✔ Animated WebP
    ✔ Animated WebP with all pages
    ✔ Animated WebP with limited looping
    ✔ GIF
    ✔ GIF grey+alpha
    ✔ Animated GIF
    ✔ Animated GIF with limited looping
    ✔ vips
    ✔ File in, Promise out
    ✔ Non-existent file in, Promise out
    ✔ Stream in, Promise out
    ✔ Stream in, rejected Promise out
    ✔ Stream
    237) Resize to half width using metadata
    238) Keep EXIF metadata and add sRGB profile after a resize
    239) Apply CMYK output ICC profile
    240) Apply custom output ICC profile
    241) Include metadata in output, enabled via empty object
    242) Remove EXIF metadata after a resize
    243) Remove metadata from PNG output
    244) Add EXIF metadata to JPEG
    245) Set density of JPEG
    246) Set density of PNG
    ✔ chromaSubsampling 4:4:4:4 CMYK JPEG
    247) chromaSubsampling 4:4:4 RGB JPEG
    248) isProgressive JPEG
    249) isProgressive PNG
    ✔ 16-bit TIFF with TIFFTAG_PHOTOSHOP metadata
    250) AVIF
    ✔ File input with corrupt header fails gracefully
    ✔ Buffer input with corrupt header fails gracefully
    ✔ Unsupported lossless JPEG passes underlying error message
    Invalid withMetadata parameters
      ✔ String orientation
      ✔ Negative orientation
      ✔ Zero orientation
      ✔ Too large orientation
      ✔ Non-numeric density
      ✔ Negative density
      ✔ Non string icc
      ✔ Non object exif
      ✔ Non string value in object exif
      ✔ Non string value in nested object exif

  Modulate
    251) should be able to hue-rotate
    252) should be able to brighten
    253) should be able to darken
    254) should be able to saturate
    255) should be able to desaturate
    256) should be able to lighten
    257) should be able to modulate all channels
    258) should be able to use linear and modulate together
    Invalid options
      ✔ should throw
      ✔ should throw
      ✔ should throw
      ✔ should throw
      ✔ should throw
      ✔ should throw
      ✔ should throw
      ✔ should throw
      ✔ should throw
      ✔ should throw
      ✔ should throw
      ✔ should throw
      ✔ should throw
      ✔ should throw
    hue-rotate
      259) should hue rotate by 30 deg
      260) should hue rotate by 60 deg
      261) should hue rotate by 90 deg
      262) should hue rotate by 120 deg
      263) should hue rotate by 150 deg
      264) should hue rotate by 180 deg
      265) should hue rotate by 210 deg
      266) should hue rotate by 240 deg
      267) should hue rotate by 270 deg
      268) should hue rotate by 300 deg
      269) should hue rotate by 330 deg
      270) should hue rotate by 360 deg

  Negate
    271) negate (jpeg)
    272) negate (png)
    273) negate (png, trans)
    274) negate (png, alpha)
    275) negate (webp)
    276) negate (webp, trans)
    277) negate (true)
    278) negate (false)
    279) negate ({alpha: true})
    280) negate non-alpha channels (png)
    281) negate non-alpha channels (png, trans)
    282) negate non-alpha channels (png, alpha)
    283) negate non-alpha channels (webp)
    284) negate non-alpha channels (webp, trans)
    ✔ invalid alpha value

  Gaussian noise
    285) generate single-channel gaussian noise
    286) generate 3-channels gaussian noise
    287) overlay 3-channels gaussian noise over image
    288) overlay strong single-channel (sRGB) gaussian noise with 25% transparency over transparent png image
    ✔ no create object properties specified
    ✔ invalid noise object
    ✔ unknown type of noise
    ✔ gaussian noise, invalid amount of channels
    ✔ gaussian noise, invalid mean
    ✔ gaussian noise, invalid sigma

  Normalization
    289) spreads rgb image values between 0 and 255
    290) spreads grayscaled image values between 0 and 255
    291) stretches greyscale images with alpha channel
    292) keeps an existing alpha channel
    293) keeps the alpha channel of greyscale images intact
    294) does not alter images with only one color
    295) works with 16-bit RGBA images

  Platform-detection
    ✔ Can override arch with npm_config_arch
    ✔ Can override platform with npm_config_platform
    ✔ Can override ARM version via --arm-version
    ✔ Can override ARM64 version via --arm-version
    ✔ Defaults to ARMv6 for 32-bit
    ✔ Defaults to ARMv8 for 64-bit
    ✔ Can ensure version ARMv7 if electron version is present

  PNG
    ✔ compression level is valid
    ✔ compression level is invalid
    296) default compressionLevel generates smaller file than compressionLevel=0
    297) without adaptiveFiltering generates smaller file
    ✔ Invalid PNG adaptiveFiltering value throws error
    298) Progressive PNG image
    299) 16-bit grey+alpha PNG identity transform
    300) 16-bit grey+alpha PNG roundtrip
    301) palette decode/encode roundtrip
    ✔ Valid PNG libimagequant palette value does not throw error
    ✔ Invalid PNG libimagequant palette value throws error
    302) Valid PNG libimagequant quality value produces image of same size or smaller
    ✔ Invalid PNG libimagequant quality value throws error
    ✔ Invalid effort value throws error
    303) Valid PNG libimagequant colours value produces image of same size or smaller
    ✔ Invalid PNG libimagequant colours value throws error
    ✔ Invalid PNG libimagequant colors value throws error
    304) Valid PNG libimagequant dither value produces image of same size or smaller
    ✔ Invalid PNG libimagequant dither value throws error

  Raw pixel data
    Raw pixel input
      ✔ Empty data
      ✔ Missing options
      ✔ Incomplete options
      ✔ Invalid channels
      ✔ Invalid height
      ✔ Invalid width
      305) RGB
      306) RGBA
      307) RGBA premultiplied
      308) JPEG to raw Stream and back again
    Output raw, uncompressed image data
      309) 1 channel greyscale image
      310) 3 channel colour image without transparency
      311) 4 channel colour image with transparency
      312) Extract A from RGBA
    Raw pixel depths
      ✔ Invalid depth
      313) Uint8Array
      314) Uint8Array
      315) Uint8ClampedArray
      316) Int8Array
      317) Uint16Array
      318) Int16Array
      319) Uint32Array
      320) Int32Array
      321) Float32Array
      322) Float64Array

  Recomb
    323) applies a sepia filter using recomb
    324) applies a sepia filter using recomb to an PNG with Alpha
    325) recomb with a single channel input
    326) applies a different sepia filter using recomb
    327) increases the saturation of the image
    invalid matrix specification
      ✔ missing
      ✔ incorrect flat data
      ✔ incorrect sub size
      ✔ incorrect top size

  Resize fit=contain
    328) Allows specifying the position as a string
    329) JPEG within PNG, no alpha channel
    330) JPEG within WebP, to include alpha channel
    331) PNG with alpha channel
    332) 16-bit PNG with alpha channel
    333) 16-bit PNG with alpha channel onto RGBA
    334) PNG with 2 channels
    335) TIFF in LAB colourspace onto RGBA background
    336) Enlarge
    ✔ Invalid position values should fail
    337) Position horizontal top
    338) Position horizontal right top
    339) Position horizontal right
    340) Position horizontal right bottom
    341) Position horizontal bottom
    342) Position horizontal left bottom
    343) Position horizontal left
    344) Position horizontal left top
    345) Position horizontal north
    346) Position horizontal northeast
    347) Position horizontal east
    348) Position horizontal southeast
    349) Position horizontal south
    350) Position horizontal southwest
    351) Position horizontal west
    352) Position horizontal northwest
    353) Position horizontal center
    354) Position vertical top
    355) Position vertical right top
    356) Position vertical right
    357) Position vertical right bottom
    358) Position vertical bottom
    359) Position vertical left bottom
    360) Position vertical left
    361) Position vertical left top
    362) Position vertical north
    363) Position vertical northeast
    364) Position vertical east
    365) Position vertical southeast
    366) Position vertical south
    367) Position vertical southwest
    368) Position vertical west
    369) Position vertical northwest
    370) Position vertical center
    Animated WebP
      371) Width only
      372) Height only

  Resize fit=cover
    373) Position: top
    374) Position: right
    375) Position: bottom
    376) Position: left
    377) Position: right top (top)
    378) Position: right top (right)
    379) Position: right bottom (bottom)
    380) Position: right bottom (right)
    381) Position: left bottom (bottom)
    382) Position: left bottom (left)
    383) Position: left top (top)
    384) Position: left top (left)
    385) Gravity: north
    386) Gravity: east
    387) Gravity: south
    388) Gravity: west
    389) Gravity: center
    390) Gravity: centre
    391) Default (centre)
    392) Gravity: northeast (north)
    393) Gravity: northeast (east)
    394) Gravity: southeast (south)
    395) Gravity: southeast (east)
    396) Gravity: southwest (south)
    397) Gravity: southwest (west)
    398) Gravity: northwest (north)
    399) Gravity: northwest (west)
    400) Allows specifying the gravity as a string
    ✔ Invalid position values fail
    ✔ Uses default value when none specified
    401) Skip crop when post-resize dimensions are at target
    Animated WebP
      402) Width only
      403) Height only
    Entropy-based strategy
      404) JPEG
      405) PNG
      406) supports the strategy passed as a string
      407) Animated image rejects
    Attention strategy
      408) JPEG
      409) PNG
      410) supports the strategy passed as a string
      411) Animated image rejects

  Resize dimensions
    412) Exact crop
    413) Fixed width
    414) Fixed height
    415) Identity transform
    416) Upscale
    ✔ Invalid width - NaN
    ✔ Invalid height - NaN
    ✔ Invalid width - float
    ✔ Invalid height - float
    ✔ Invalid width - via options
    ✔ Invalid height - via options
    417) Invalid width - too large
    418) Invalid height - too large
    419) WebP shrink-on-load rounds to zero, ensure recalculation is correct
    420) JPEG shrink-on-load with 90 degree rotation, ensure recalculation is correct
    421) TIFF embed known to cause rounding errors
    422) TIFF known to cause rounding errors
    423) fit=inside, portrait
    424) fit=outside, portrait
    425) fit=inside, landscape
    426) fit=outside, landscape
    427) fit=inside, provide only one dimension
    428) fit=outside, provide only one dimension
    429) Do not enlarge when input width is already less than output width
    430) Do not enlarge when input height is already less than output height
    431) Do crop when fit = cover and withoutEnlargement = true and width >= outputWidth, and height < outputHeight
    432) Do crop when fit = cover and withoutEnlargement = true and width < outputWidth, and height >= outputHeight
    433) Do enlarge when input width is less than output width
    434) Do enlarge when input width is less than output width
    435) Do enlarge when input height is less than output height
    436) Do not crop when fit = cover and withoutReduction = true and width >= outputWidth, and height < outputHeight
    437) Do not crop when fit = cover and withoutReduction = true and width < outputWidth, and height >= outputHeight
    438) Do enlarge when input width is less than output width
    439) Do not resize when both withoutEnlargement and withoutReduction are true
    440) Do not reduce size when fit = outside and withoutReduction are true and height > outputHeight and width > outputWidth
    441) Do resize when fit = outside and withoutReduction are true and input height > height and input width > width 
    442) fit=fill, downscale width and height
    443) fit=fill, downscale width
    444) fit=fill, downscale height
    445) fit=fill, upscale width and height
    446) fit=fill, upscale width
    447) fit=fill, upscale height
    448) fit=fill, downscale width, upscale height
    449) fit=fill, upscale width, downscale height
    450) fit=fill, identity transform
    451) Dimensions that result in differing even shrinks on each axis
    452) Dimensions that result in differing odd shrinks on each axis
    453) fastShrinkOnLoad: false ensures image is not shifted
    454) fastShrinkOnLoad: true (default) might result in shifted image
    455) kernel nearest
    456) kernel cubic
    457) kernel mitchell
    458) kernel lanczos2
    459) kernel lanczos3
    460) nearest upsampling with integral factor
    461) Ensure shortest edge (height) is at least 1 pixel
    462) Ensure shortest edge (width) is at least 1 pixel
    463) Ensure embedded shortest edge (height) is at least 1 pixel
    464) Ensure embedded shortest edge (width) is at least 1 pixel
    465) Skip shrink-on-load where one dimension <4px
    ✔ unknown kernel throws
    ✔ unknown fit throws
    ✔ unknown position throws

  Rotation
    466) Input image has Orientation EXIF tag value of (1), auto-rotate
    467) Input image has Orientation EXIF tag value of (2), auto-rotate
    468) Input image has Orientation EXIF tag value of (3), auto-rotate
    469) Input image has Orientation EXIF tag value of (4), auto-rotate
    470) Input image has Orientation EXIF tag value of (5), auto-rotate
    471) Input image has Orientation EXIF tag value of (6), auto-rotate
    472) Input image has Orientation EXIF tag value of (7), auto-rotate
    473) Input image has Orientation EXIF tag value of (8), auto-rotate
    474) Input image has Orientation EXIF tag value of (1), auto-rotate
    475) Input image has Orientation EXIF tag value of (2), auto-rotate
    476) Input image has Orientation EXIF tag value of (3), auto-rotate
    477) Input image has Orientation EXIF tag value of (4), auto-rotate
    478) Input image has Orientation EXIF tag value of (5), auto-rotate
    479) Input image has Orientation EXIF tag value of (6), auto-rotate
    480) Input image has Orientation EXIF tag value of (7), auto-rotate
    481) Input image has Orientation EXIF tag value of (8), auto-rotate
    482) Rotate by 30 degrees with semi-transparent background
    483) Rotate by 30 degrees with solid background
    484) Rotate by 90 degrees, respecting output input size
    485) Rotate by 30 degrees, respecting output input size
    486) Rotate by any 90-multiple angle (-3690deg)
    487) Rotate by any 90-multiple angle (-450deg)
    488) Rotate by any 90-multiple angle (-90deg)
    489) Rotate by any 90-multiple angle (90deg)
    490) Rotate by any 90-multiple angle (450deg)
    491) Rotate by any 90-multiple angle (3690deg)
    492) Rotate by any 30-multiple angle (-3750deg)
    493) Rotate by any 30-multiple angle (-510deg)
    494) Rotate by any 30-multiple angle (-150deg)
    495) Rotate by any 30-multiple angle (30deg)
    496) Rotate by any 30-multiple angle (390deg)
    497) Rotate by any 30-multiple angle (3630deg)
    498) Rotate by any 180-multiple angle (-3780deg)
    499) Rotate by any 180-multiple angle (-540deg)
    500) Rotate by any 180-multiple angle (0deg)
    501) Rotate by any 180-multiple angle (180deg)
    502) Rotate by any 180-multiple angle (540deg)
    503) Rotate by any 180-multiple angle (3780deg)
    504) Rotate by 270 degrees, square output ignoring aspect ratio
    505) Rotate by 315 degrees, square output ignoring aspect ratio
    506) Rotate by 270 degrees, rectangular output ignoring aspect ratio
    507) Rotate by 30 degrees, rectangular output ignoring aspect ratio
    508) Input image has Orientation EXIF tag but do not rotate output
    509) Input image has Orientation EXIF tag value of 8 (270 degrees), auto-rotate
    510) Override EXIF Orientation tag metadata after auto-rotate
    511) Input image has Orientation EXIF tag value of 5 (270 degrees + flip), auto-rotate
    512) Attempt to auto-rotate using image that has no EXIF
    513) Attempt to auto-rotate image format without EXIF support
    ✔ Rotate with a string argument, should fail
    514) Animated image rotate-then-extract rejects
    515) Animated image extract-then-rotate rejects
    516) Flip - vertical
    517) Flop - horizontal
    518) Flip and flop
    519) Neither flip nor flop
    520) Auto-rotate and flip
    521) Auto-rotate and flop

  Sharpen
    522) specific radius 10 (sigma 6)
    523) specific radius 3 (sigma 1.5) and levels 0.5, 2.5
    524) specific radius 5 (sigma 3.5) and levels 2, 4
    525) specific radius/levels with alpha channel
    526) mild sharpen
    ✔ invalid sigma
    ✔ invalid flat
    ✔ invalid jagged
    527) sharpened image is larger than non-sharpened

  Image Stats
    ✔ JPEG
    ✔ PNG without transparency
    ✔ PNG with transparency
    ✔ PNG fully transparent
    ✔ Tiff
    ✔ WebP
    ✔ GIF
    ✔ Grayscale GIF with alpha
    ✔ CMYK input without profile
    ✔ Dominant colour
    ✔ Entropy and sharpness of 1x1 input are zero
    ✔ Stream in, Callback out
    ✔ Stream in, Promise out
    ✔ File in, Promise out
    528) Blurred image has lower sharpness than original
    ✔ File input with corrupt header fails gracefully
    ✔ File input with corrupt header fails gracefully, Promise out
    ✔ File input with corrupt header fails gracefully, Stream In, Promise Out
    ✔ Buffer input with corrupt header fails gracefully
    ✔ Non-existent file in, Promise out

  SVG input
    529) Convert SVG to PNG at default 72DPI
    530) Convert SVG to PNG at 1200DPI
    531) Convert SVG to PNG at DPI larger than 2400
    532) Convert SVG to PNG utilizing scale-on-load
    533) Convert SVG to PNG at 14.4DPI
    534) Convert SVG with embedded images to PNG, respecting dimensions, autoconvert to PNG
    535) Converts SVG with truncated embedded PNG

  Threshold
    536) threshold 1 jpeg
    537) threshold 40 jpeg
    538) threshold 128
    539) threshold true (=128)
    540) threshold false (=0)
    541) threshold grayscale: true (=128)
    542) threshold default jpeg
    543) threshold default png transparency
    544) threshold default png alpha
    545) threshold default webp transparency
    546) color threshold
    ✔ invalid threshold -1
    ✔ invalid threshold 256

  TIFF
    547) Load TIFF from Buffer
    548) Load multi-page TIFF from file
    549) Load multi-page TIFF from Buffer
    550) Save TIFF to Buffer
    551) Increasing TIFF quality increases file size
    ✔ Invalid TIFF quality throws error
    ✔ Missing TIFF quality does not throw error
    552) Not squashing TIFF to a bit depth of 1 should not change the file size
    553) Squashing TIFF to a bit depth of 1 should significantly reduce file size
    ✔ Invalid TIFF bitdepth value throws error
    554) TIFF setting xres and yres on file
    555) TIFF setting xres and yres on buffer
    556) TIFF imputes xres and yres from withMetadataDensity if not explicitly provided
    557) TIFF uses xres and yres over withMetadataDensity if explicitly provided
    ✔ TIFF invalid xres value should throw an error
    ✔ TIFF invalid yres value should throw an error
    558) TIFF lzw compression with horizontal predictor shrinks test file
    559) TIFF LZW RGBA toFile
    560) TIFF LZW RGBA toBuffer
    561) TIFF ccittfax4 compression shrinks b-w test file
    562) TIFF deflate compression with horizontal predictor shrinks test file
    563) TIFF deflate compression with float predictor shrinks test file
    564) TIFF deflate compression without predictor shrinks test file
    565) TIFF jpeg compression shrinks test file
    ✔ TIFF none compression does not throw error
    ✔ TIFF lzw compression does not throw error
    ✔ TIFF deflate compression does not throw error
    ✔ TIFF invalid compression option throws
    ✔ TIFF invalid compression option throws
    ✔ TIFF invalid predictor option throws
    ✔ TIFF horizontal predictor does not throw error
    ✔ TIFF float predictor does not throw error
    ✔ TIFF none predictor does not throw error
    566) TIFF tiled pyramid image without compression enlarges test file
    ✔ TIFF pyramid true value does not throw error
    ✔ Invalid TIFF pyramid value throws error
    ✔ Invalid TIFF tile value throws error
    ✔ TIFF tile true value does not throw error
    ✔ Valid TIFF tileHeight value does not throw error
    ✔ Valid TIFF tileWidth value does not throw error
    ✔ Invalid TIFF tileHeight value throws error
    ✔ Invalid TIFF tileWidth value throws error
    ✔ Invalid TIFF tileHeight value throws error
    ✔ Invalid TIFF tileWidth value throws error
    567) TIFF file input with invalid page fails gracefully
    568) TIFF buffer input with invalid page fails gracefully

  Tile
    ✔ Valid size values pass
    ✔ Invalid size values fail
    ✔ Valid overlap values pass
    ✔ Invalid overlap values fail
    ✔ Valid container values pass
    ✔ Invalid container values fail
    ✔ Valid layout values pass
    ✔ Invalid layout values fail
    ✔ Valid formats pass
    ✔ Invalid formats fail
    ✔ Valid depths pass
    ✔ Invalid depths fail
    ✔ Prevent larger overlap than default size
    ✔ Prevent larger overlap than provided size
    ✔ Valid rotation angle values pass
    ✔ Invalid rotation angle values fail
    ✔ Valid skipBlanks threshold values pass
    ✔ InvalidskipBlanks threshold values fail
    ✔ Invalid center parameter value fail
    ✔ Valid id parameter value passes
    ✔ Invalid id parameter value fails
    569) Deep Zoom layout
    570) Deep Zoom layout with custom size+overlap
    571) Deep Zoom layout with custom size+angle
    572) Deep Zoom layout with depth of one
    573) Deep Zoom layout with depth of onepixel
    574) Deep Zoom layout with depth of onetile
    575) Deep Zoom layout with skipBlanks
    576) Zoomify layout
    577) Zoomify layout with depth one
    578) Zoomify layout with depth onetile
    579) Zoomify layout with depth onepixel
    580) Zoomify layout with skip blanks
    581) Google layout
    582) Google layout with jpeg format
    583) Google layout with png format
    584) Google layout with webp format
    585) Google layout with depth one
    586) Google layout with depth onepixel
    587) Google layout with depth onetile
    588) Google layout with default skip Blanks
    589) Google layout with center image in tile
    590) Google layout with center image in tile centre
    591) IIIFv2 layout
    592) IIIFv3 layout
    593) Write to ZIP container using file extension
    594) Write to ZIP container using container tile option

  Timeout
    595) Will timeout after 1s when performing slow blur operation
    ✔ invalid object
    ✔ invalid seconds

  Tint
    596) tints rgb image red
    597) tints rgb image green
    598) tints rgb image blue
    599) tints rgb image with sepia tone
    600) tints rgb image with sepia tone with rgb colour
    601) tints rgb image with alpha channel
    602) tints cmyk image red

  toBuffer
    603) reusing same sharp object does not reset previously passed parameters to toBuffer
    604) correctly process animated webp with height > 16383

  toFormat
    605) accepts upper case characters as format parameter (string)
    606) accepts upper case characters as format parameter (object)

  Trim borders
    607) Threshold default
    608) Skip shrink-on-load
    609) single colour PNG where alpha channel provides the image
    610) 16-bit PNG with alpha channel
    611) Attempt to trim 2x2 pixel image fails
    612) should rotate before trim
    613) Animated image rejects
    Invalid thresholds
      ✔ -1
      ✔ "fail"
      ✔ {}

  Utilities
    Cache
      ✔ Can be disabled
      ✔ Can be enabled with defaults
      ✔ Can be set to zero
      ✔ Can be set to a maximum of 10MB, 100 files and 1000 items
      ✔ Ignores invalid values
    Concurrency
      ✔ Can be set to use 16 threads
      ✔ Can be reset to default
      ✔ Ignores invalid values
    Counters
      ✔ Have zero value at rest
    SIMD
      ✔ Can get current state
      ✔ Can disable
      ✔ Can attempt to enable
    Format
      ✔ Contains expected attributes
      ✔ Raw file=false, buffer=true, stream=true
      ✔ vips format supports filesystem only
    Versions
      ✔ Contains expected attributes
    Vendor
      ✔ Contains expected attributes

  WebP
    614) WebP output
    ✔ Invalid WebP quality throws error
    ✔ Invalid WebP alpha quality throws error
    615) should work for webp alpha quality
    616) should work for webp lossless
    617) should work for webp near-lossless
    618) should use near-lossless when both lossless and nearLossless are specified
    619) should produce a larger file size using smartSubsample
    ✔ invalid smartSubsample throws
    620) should produce a smaller file size with increased effort
    ✔ invalid effort throws
    ✔ invalid reductionEffort (deprecated) throws
    ✔ out of range effort throws
    ✔ invalid loop throws
    ✔ invalid delay throws
    621) should repeat a single delay for all frames
    622) should limit animation loop
    623) should change delay between frames
    624) should work with streams when only animated is set
    625) should work with streams when only pages is set
    626) should resize animated image to page height


  359 passing (3m)
  626 failing

  1) Affine transform
       Applies identity matrix:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:75:8)
      at processImmediate (internal/timers.js:464:21)

  2) Affine transform
       Applies resize affine matrix:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:86:8)
      at processImmediate (internal/timers.js:464:21)

  3) Affine transform
       Resizes and applies affine transform:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:98:8)
      at processImmediate (internal/timers.js:464:21)

  4) Affine transform
       Extracts and applies affine transform:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:107:8)
      at processImmediate (internal/timers.js:464:21)

  5) Affine transform
       Rotates and applies affine transform:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:116:8)
      at processImmediate (internal/timers.js:464:21)

  6) Affine transform
       Extracts, rotates and applies affine transform:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:126:8)
      at processImmediate (internal/timers.js:464:21)

  7) Affine transform
       Applies affine transform with background color:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:135:8)
      at processImmediate (internal/timers.js:464:21)

  8) Affine transform
       Applies affine transform with background color and output offsets:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:144:8)
      at processImmediate (internal/timers.js:464:21)

  9) Affine transform
       Applies affine transform with background color and all offsets:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:153:8)
      at processImmediate (internal/timers.js:464:21)

  10) Affine transform
       Animated image rejects:
     AssertionError [ERR_ASSERTION]: The input did not match the regular expression /Affine is not supported for multi-page images/. Input:

'Error: A number was expected'

  

  11) Affine transform
       Interpolations
         Performs 2x upscale with nearest interpolation:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:175:12)
      at processImmediate (internal/timers.js:464:21)

  12) Affine transform
       Interpolations
         Performs 2x upscale with bilinear interpolation:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:175:12)
      at processImmediate (internal/timers.js:464:21)

  13) Affine transform
       Interpolations
         Performs 2x upscale with bicubic interpolation:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:175:12)
      at processImmediate (internal/timers.js:464:21)

  14) Affine transform
       Interpolations
         Performs 2x upscale with locallyBoundedBicubic interpolation:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:175:12)
      at processImmediate (internal/timers.js:464:21)

  15) Affine transform
       Interpolations
         Performs 2x upscale with nohalo interpolation:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:175:12)
      at processImmediate (internal/timers.js:464:21)

  16) Affine transform
       Interpolations
         Performs 2x upscale with vertexSplitQuadraticBasisSpline interpolation:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/affine.js:175:12)
      at processImmediate (internal/timers.js:464:21)

  17) Alpha transparency
       Flatten to black:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/alpha.js:12:8)
      at processImmediate (internal/timers.js:464:21)

  18) Alpha transparency
       Flatten to RGB orange:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/alpha.js:26:8)
      at processImmediate (internal/timers.js:464:21)

  19) Alpha transparency
       Flatten to CSS/hex orange:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/alpha.js:38:8)
      at processImmediate (internal/timers.js:464:21)

  20) Alpha transparency
       Flatten 16-bit PNG with transparency to orange:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/alpha.js:52:8)
      at processImmediate (internal/timers.js:464:21)

  21) Alpha transparency
       Do not flatten:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/alpha.js:65:8)
      at processImmediate (internal/timers.js:464:21)

  22) Alpha transparency
       Ignored for JPEG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/alpha.js:76:8)
      at processImmediate (internal/timers.js:464:21)

  23) Alpha transparency
       Enlargement with non-nearest neighbor interpolation shouldn’t cause dark edges:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/alpha.js:102:8)
      at processImmediate (internal/timers.js:464:21)

  24) Alpha transparency
       Reduction with non-nearest neighbor interpolation shouldn’t cause dark edges:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/alpha.js:114:8)
      at processImmediate (internal/timers.js:464:21)

  25) Alpha transparency
       Removes alpha from fixtures with transparency, ignores those without:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at /Users/joshua/Projects/sharp/test/unit/alpha.js:132:10
      at Array.map (<anonymous>)
      at Context.<anonymous> (test/unit/alpha.js:128:7)
      at processImmediate (internal/timers.js:464:21)

  26) Alpha transparency
       Ensures alpha from fixtures without transparency, ignores those with:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at /Users/joshua/Projects/sharp/test/unit/alpha.js:152:10
      at Array.map (<anonymous>)
      at Context.<anonymous> (test/unit/alpha.js:147:7)
      at processImmediate (internal/timers.js:464:21)

  27) Alpha transparency
       Valid ensureAlpha value used for alpha channel:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/alpha.js:171:8)
      at processImmediate (internal/timers.js:464:21)

  28) AVIF
       can convert AVIF to JPEG:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/avif.js:19:8)
      at processImmediate (internal/timers.js:464:21)

  29) AVIF
       can convert JPEG to AVIF:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/avif.js:41:8)
      at processImmediate (internal/timers.js:464:21)

  30) AVIF
       can passthrough AVIF:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/avif.js:63:8)
      at processImmediate (internal/timers.js:464:21)

  31) AVIF
       can convert animated GIF to non-animated AVIF:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/avif.js:86:8)
      at processImmediate (internal/timers.js:464:21)

  32) Bandbool per-channel boolean operations
       and operation:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/bandbool.js:18:12)
      at processImmediate (internal/timers.js:464:21)

  33) Bandbool per-channel boolean operations
       or operation:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/bandbool.js:18:12)
      at processImmediate (internal/timers.js:464:21)

  34) Bandbool per-channel boolean operations
       eor operation:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/bandbool.js:18:12)
      at processImmediate (internal/timers.js:464:21)

  35) Bandbool per-channel boolean operations
       sRGB image retains 3 channels:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/bandbool.js:31:8)
      at processImmediate (internal/timers.js:464:21)

  36) Blur
       specific radius 1:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/blur.js:13:8)
      at processImmediate (internal/timers.js:464:21)

  37) Blur
       specific radius 10:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/blur.js:26:8)
      at processImmediate (internal/timers.js:464:21)

  38) Blur
       specific radius 0.3:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/blur.js:39:8)
      at processImmediate (internal/timers.js:464:21)

  39) Blur
       mild blur:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/blur.js:52:8)
      at processImmediate (internal/timers.js:464:21)

  40) Blur
       blurred image is smaller than non-blurred:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/blur.js:71:8)
      at processImmediate (internal/timers.js:464:21)

  41) Boolean operation between two images
       and operation, file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/boolean.js:22:12)
      at processImmediate (internal/timers.js:464:21)

  42) Boolean operation between two images
       and operation, buffer:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/boolean.js:34:12)
      at processImmediate (internal/timers.js:464:21)

  43) Boolean operation between two images
       and operation, raw:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/boolean.js:45:12)
      at processImmediate (internal/timers.js:464:21)

  44) Boolean operation between two images
       or operation, file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/boolean.js:22:12)
      at processImmediate (internal/timers.js:464:21)

  45) Boolean operation between two images
       or operation, buffer:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/boolean.js:34:12)
      at processImmediate (internal/timers.js:464:21)

  46) Boolean operation between two images
       or operation, raw:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/boolean.js:45:12)
      at processImmediate (internal/timers.js:464:21)

  47) Boolean operation between two images
       eor operation, file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/boolean.js:22:12)
      at processImmediate (internal/timers.js:464:21)

  48) Boolean operation between two images
       eor operation, buffer:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/boolean.js:34:12)
      at processImmediate (internal/timers.js:464:21)

  49) Boolean operation between two images
       eor operation, raw:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/boolean.js:45:12)
      at processImmediate (internal/timers.js:464:21)

  50) Clahe
       width 5 width 5 maxSlope 0:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/clahe.js:12:8)
      at processImmediate (internal/timers.js:464:21)

  51) Clahe
       width 5 width 5 maxSlope 5:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/clahe.js:22:8)
      at processImmediate (internal/timers.js:464:21)

  52) Clahe
       width 11 width 25 maxSlope 14:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/clahe.js:32:8)
      at processImmediate (internal/timers.js:464:21)

  53) Clahe
       width 50 width 50 maxSlope 0:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/clahe.js:42:8)
      at processImmediate (internal/timers.js:464:21)

  54) Clahe
       width 50 width 50 maxSlope 14:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/clahe.js:52:8)
      at processImmediate (internal/timers.js:464:21)

  55) Clahe
       width 100 width 50 maxSlope 3:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/clahe.js:62:8)
      at processImmediate (internal/timers.js:464:21)

  56) Clahe
       width 100 width 100 maxSlope 0:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/clahe.js:72:8)
      at processImmediate (internal/timers.js:464:21)

  57) Clahe
       uses default maxSlope of 3:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/clahe.js:133:8)
      at processImmediate (internal/timers.js:464:21)

  58) Clone
       Read from Stream and write to multiple Streams:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:478:132)
      at Sharp.<anonymous> (lib/constructor.js:193:126)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  59) Colour space conversion
       To greyscale:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/colourspace.js:13:8)
      at processImmediate (internal/timers.js:464:21)

  60) Colour space conversion
       To greyscale with gamma correction:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/colourspace.js:21:8)
      at processImmediate (internal/timers.js:464:21)

  61) Colour space conversion
       Not to greyscale:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/colourspace.js:28:8)
      at processImmediate (internal/timers.js:464:21)

  62) Colour space conversion
       Greyscale with single channel output:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/colourspace.js:36:8)
      at processImmediate (internal/timers.js:464:21)

  63) Colour space conversion
       From 1-bit TIFF to sRGB WebP:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/colourspace.js:49:8)
      at processImmediate (internal/timers.js:464:21)

  64) Colour space conversion
       From CMYK to sRGB:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/colourspace.js:58:8)
      at processImmediate (internal/timers.js:464:21)

  65) Colour space conversion
       From CMYK to sRGB with white background, not yellow:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/colourspace.js:73:8)
      at processImmediate (internal/timers.js:464:21)

  66) Colour space conversion
       From profile-less CMYK to sRGB:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/colourspace.js:85:8)
      at processImmediate (internal/timers.js:464:21)

  67) Colour space conversion
       From sRGB with RGB16 pipeline, resize with gamma, to sRGB:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/colourspace.js:99:8)
      at processImmediate (internal/timers.js:464:21)

  68) Colour space conversion
       Convert P3 to sRGB:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/colourspace.js:111:8)
      at processImmediate (internal/timers.js:464:21)

  69) Colour space conversion
       Passthrough P3:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/colourspace.js:121:8)
      at processImmediate (internal/timers.js:464:21)

  70) composite
       blend:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/composite.js:58:10
      at Array.map (<anonymous>)
      at Context.<anonymous> (test/unit/composite.js:49:12)
      at processImmediate (internal/timers.js:464:21)

  71) composite
       premultiplied true:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/composite.js:79:8)
      at processImmediate (internal/timers.js:464:21)

  72) composite
       premultiplied false:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/composite.js:99:8)
      at processImmediate (internal/timers.js:464:21)

  73) composite
       premultiplied absent:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/composite.js:118:8)
      at processImmediate (internal/timers.js:464:21)

  74) composite
       multiple:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/composite.js:136:8)
      at processImmediate (internal/timers.js:464:21)

  75) composite
       zero offset:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:150:8)
      at processImmediate (internal/timers.js:464:21)

  76) composite
       offset and gravity:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:167:8)
      at processImmediate (internal/timers.js:464:21)

  77) composite
       negative offset and gravity:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:184:8)
      at processImmediate (internal/timers.js:464:21)

  78) composite
       offset, gravity and tile:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:203:8)
      at processImmediate (internal/timers.js:464:21)

  79) composite
       offset and tile:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:220:8)
      at processImmediate (internal/timers.js:464:21)

  80) composite
       centre gravity should replicate correct number of tiles:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:241:8)
      at processImmediate (internal/timers.js:464:21)

  81) composite
       cutout via dest-in:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:256:8)
      at processImmediate (internal/timers.js:464:21)

  82) composite
       Allow offset beyond bottom/right edge:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:423:8)
      at processImmediate (internal/timers.js:464:21)

  83) composite
       numeric gravity
         center:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:275:12)
      at processImmediate (internal/timers.js:464:21)

  84) composite
       numeric gravity
         centre:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:275:12)
      at processImmediate (internal/timers.js:464:21)

  85) composite
       numeric gravity
         north:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:275:12)
      at processImmediate (internal/timers.js:464:21)

  86) composite
       numeric gravity
         east:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:275:12)
      at processImmediate (internal/timers.js:464:21)

  87) composite
       numeric gravity
         south:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:275:12)
      at processImmediate (internal/timers.js:464:21)

  88) composite
       numeric gravity
         west:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:275:12)
      at processImmediate (internal/timers.js:464:21)

  89) composite
       numeric gravity
         northeast:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:275:12)
      at processImmediate (internal/timers.js:464:21)

  90) composite
       numeric gravity
         southeast:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:275:12)
      at processImmediate (internal/timers.js:464:21)

  91) composite
       numeric gravity
         southwest:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:275:12)
      at processImmediate (internal/timers.js:464:21)

  92) composite
       numeric gravity
         northwest:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:275:12)
      at processImmediate (internal/timers.js:464:21)

  93) composite
       string gravity
         center:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:297:12)
      at processImmediate (internal/timers.js:464:21)

  94) composite
       string gravity
         centre:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:297:12)
      at processImmediate (internal/timers.js:464:21)

  95) composite
       string gravity
         north:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:297:12)
      at processImmediate (internal/timers.js:464:21)

  96) composite
       string gravity
         east:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:297:12)
      at processImmediate (internal/timers.js:464:21)

  97) composite
       string gravity
         south:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:297:12)
      at processImmediate (internal/timers.js:464:21)

  98) composite
       string gravity
         west:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:297:12)
      at processImmediate (internal/timers.js:464:21)

  99) composite
       string gravity
         northeast:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:297:12)
      at processImmediate (internal/timers.js:464:21)

  100) composite
       string gravity
         southeast:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:297:12)
      at processImmediate (internal/timers.js:464:21)

  101) composite
       string gravity
         southwest:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:297:12)
      at processImmediate (internal/timers.js:464:21)

  102) composite
       string gravity
         northwest:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:297:12)
      at processImmediate (internal/timers.js:464:21)

  103) composite
       tile and gravity
         center:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:320:12)
      at processImmediate (internal/timers.js:464:21)

  104) composite
       tile and gravity
         centre:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:320:12)
      at processImmediate (internal/timers.js:464:21)

  105) composite
       tile and gravity
         north:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:320:12)
      at processImmediate (internal/timers.js:464:21)

  106) composite
       tile and gravity
         east:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:320:12)
      at processImmediate (internal/timers.js:464:21)

  107) composite
       tile and gravity
         south:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:320:12)
      at processImmediate (internal/timers.js:464:21)

  108) composite
       tile and gravity
         west:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:320:12)
      at processImmediate (internal/timers.js:464:21)

  109) composite
       tile and gravity
         northeast:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:320:12)
      at processImmediate (internal/timers.js:464:21)

  110) composite
       tile and gravity
         southeast:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:320:12)
      at processImmediate (internal/timers.js:464:21)

  111) composite
       tile and gravity
         southwest:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:320:12)
      at processImmediate (internal/timers.js:464:21)

  112) composite
       tile and gravity
         northwest:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/composite.js:320:12)
      at processImmediate (internal/timers.js:464:21)

  113) Convolve
       specific convolution kernel 1:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/convolve.js:22:8)
      at processImmediate (internal/timers.js:464:21)

  114) Convolve
       specific convolution kernel 2:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/convolve.js:42:8)
      at processImmediate (internal/timers.js:464:21)

  115) Convolve
       horizontal Sobel operator:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/convolve.js:63:8)
      at processImmediate (internal/timers.js:464:21)

  116) Extend
       extend all sides equally with RGB:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extend.js:45:8)
      at processImmediate (internal/timers.js:464:21)

  117) Extend
       extend sides unequally with RGBA:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extend.js:62:8)
      at processImmediate (internal/timers.js:464:21)

  118) Extend
       should add alpha channel before extending with a transparent Background:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extend.js:116:8)
      at processImmediate (internal/timers.js:464:21)

  119) Extend
       PNG with 2 channels:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extend.js:131:8)
      at processImmediate (internal/timers.js:464:21)

  120) Extend
       Premultiply background when compositing:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extend.js:160:8)
      at processImmediate (internal/timers.js:464:21)

  121) Extend
       extend all sides equally via a single value
         JPEG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extend.js:14:10)
      at processImmediate (internal/timers.js:464:21)

  122) Extend
       extend all sides equally via a single value
         Animated WebP:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extend.js:26:10)
      at processImmediate (internal/timers.js:464:21)

  123) Partial image extraction
       JPEG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:12:8)
      at processImmediate (internal/timers.js:464:21)

  124) Partial image extraction
       PNG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:23:8)
      at processImmediate (internal/timers.js:464:21)

  125) Partial image extraction
       WebP:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:34:8)
      at processImmediate (internal/timers.js:464:21)

  126) Partial image extraction
       TIFF:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:71:8)
      at processImmediate (internal/timers.js:464:21)

  127) Partial image extraction
       Before resize:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:83:8)
      at processImmediate (internal/timers.js:464:21)

  128) Partial image extraction
       After resize and crop:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:97:8)
      at processImmediate (internal/timers.js:464:21)

  129) Partial image extraction
       Before and after resize and crop:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:112:8)
      at processImmediate (internal/timers.js:464:21)

  130) Partial image extraction
       Extract then rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:125:8)
      at processImmediate (internal/timers.js:464:21)

  131) Partial image extraction
       Rotate then extract:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:137:8)
      at processImmediate (internal/timers.js:464:21)

  132) Partial image extraction
       Extract then rotate non-90 anagle:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:150:8)
      at processImmediate (internal/timers.js:464:21)

  133) Partial image extraction
       Rotate then extract non-90 angle:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:163:8)
      at processImmediate (internal/timers.js:464:21)

  134) Partial image extraction
       Rotate with EXIF mirroring then extract:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:175:8)
      at processImmediate (internal/timers.js:464:21)

  135) Partial image extraction
       Animated WebP
         Before resize:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:47:10)
      at processImmediate (internal/timers.js:464:21)

  136) Partial image extraction
       Animated WebP
         After resize:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:59:10)
      at processImmediate (internal/timers.js:464:21)

  137) Partial image extraction
       Invalid parameters
         Bad image area:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extract.js:241:10)
      at processImmediate (internal/timers.js:464:21)

  138) Image channel extraction
       Red channel:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extractChannel.js:13:8)
      at processImmediate (internal/timers.js:464:21)

  139) Image channel extraction
       Green channel:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extractChannel.js:25:8)
      at processImmediate (internal/timers.js:464:21)

  140) Image channel extraction
       Blue channel:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extractChannel.js:37:8)
      at processImmediate (internal/timers.js:464:21)

  141) Image channel extraction
       Blue channel by number:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extractChannel.js:49:8)
      at processImmediate (internal/timers.js:464:21)

  142) Image channel extraction
       With colorspace conversion:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/extractChannel.js:63:8)
      at processImmediate (internal/timers.js:464:21)

  143) Image channel extraction
       Alpha from 16-bit PNG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/extractChannel.js:77:8)
      at processImmediate (internal/timers.js:464:21)

  144) Image channel extraction
       Alpha from 2-channel input:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/extractChannel.js:89:8)
      at processImmediate (internal/timers.js:464:21)

  145) Image channel extraction
       Non-existent channel:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/extractChannel.js:114:8)
      at processImmediate (internal/timers.js:464:21)

  146) failOnError
       handles truncated JPEG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/failOnError.js:13:8)
      at processImmediate (internal/timers.js:464:21)

  147) failOnError
       handles truncated PNG, emits warnings:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/failOnError.js:30:8)
      at processImmediate (internal/timers.js:464:21)

  148) failOnError
       returns errors to callback for truncated JPEG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/failOnError.js:55:39)
      at processImmediate (internal/timers.js:464:21)

  149) failOnError
       returns errors to callback for truncated PNG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/failOnError.js:64:39)
      at processImmediate (internal/timers.js:464:21)

  150) failOnError
       rejects promises for truncated JPEG:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/failOnError.js:74:8)
      at processImmediate (internal/timers.js:464:21)

  151) failOnError
       handles stream-based input:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:481:221)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  152) Gamma correction
       value of 0.0 (disabled):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/gamma.js:12:8)
      at processImmediate (internal/timers.js:464:21)

  153) Gamma correction
       value of 2.2 (default):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/gamma.js:25:8)
      at processImmediate (internal/timers.js:464:21)

  154) Gamma correction
       value of 3.0:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/gamma.js:38:8)
      at processImmediate (internal/timers.js:464:21)

  155) Gamma correction
       input value of 2.2, output value of 3.0:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/gamma.js:51:8)
      at processImmediate (internal/timers.js:464:21)

  156) Gamma correction
       alpha transparency:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/gamma.js:65:8)
      at processImmediate (internal/timers.js:464:21)

  157) GIF input
       GIF Buffer to JPEG Buffer:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/gif.js:14:8)
      at processImmediate (internal/timers.js:464:21)

  158) GIF input
       2 channel GIF file to PNG Buffer:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/gif.js:28:8)
      at processImmediate (internal/timers.js:464:21)

  159) GIF input
       Animated GIF first page to PNG:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/gif.js:41:8)
      at processImmediate (internal/timers.js:464:21)

  160) GIF input
       Animated GIF all pages to PNG "toilet roll":
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/gif.js:54:8)
      at processImmediate (internal/timers.js:464:21)

  161) GIF input
       GIF with reduced colours, no dither, low effort reduces file size:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/gif.js:69:8)
      at processImmediate (internal/timers.js:464:21)

  162) GIF input
       should work with streams when only animated is set:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:475:130)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  163) GIF input
       should work with streams when only pages is set:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:475:130)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  164) Input/output
       Read from File and write to Stream:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:479:7)
      at Sharp._read (lib/output.js:469:240)
      at Sharp.Readable.read (internal/streams/readable.js:465:10)
      at resume_ (internal/streams/readable.js:963:12)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  165) Input/output
       Read from Buffer and write to Stream:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:479:7)
      at Sharp._read (lib/output.js:469:240)
      at Sharp.Readable.read (internal/streams/readable.js:465:10)
      at resume_ (internal/streams/readable.js:963:12)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  166) Input/output
       Read from Stream and write to File:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:475:130)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  167) Input/output
       Read from Stream and write to Buffer:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:475:130)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  168) Input/output
       Read from Stream and write to Buffer via Promise resolved with Buffer:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:481:221)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  169) Input/output
       Read from Stream and write to Buffer via Promise resolved with Object:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:481:221)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  170) Input/output
       Read from File and write to Buffer via Promise resolved with Buffer:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:112:8)
      at processImmediate (internal/timers.js:464:21)

  171) Input/output
       Read from File and write to Buffer via Promise resolved with Object:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:122:8)
      at processImmediate (internal/timers.js:464:21)

  172) Input/output
       Read from Stream and write to Stream:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:478:132)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  173) Input/output
       Read from Uint8Array and write to Buffer:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:161:8)
      at processImmediate (internal/timers.js:464:21)

  174) Input/output
       Read from Uint8ClampedArray and output to Buffer:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:178:8)
      at processImmediate (internal/timers.js:464:21)

  175) Input/output
       Stream should emit info event:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:478:132)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  176) Input/output
       Stream should emit close event:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:478:132)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  177) Input/output
       Handle Stream to Stream error :
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:478:132)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  178) Input/output
       Handle File to Stream error:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:479:7)
      at Sharp._read (lib/output.js:469:240)
      at Sharp.Readable.read (internal/streams/readable.js:465:10)
      at resume_ (internal/streams/readable.js:963:12)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  179) Input/output
       Readable side of Stream can start flowing after Writable side has finished:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:478:132)
      at Sharp._pipeline (lib/output.js:478:641)
      at Sharp._read (lib/output.js:469:240)
      at Sharp.Readable.read (internal/streams/readable.js:465:10)
      at resume_ (internal/streams/readable.js:963:12)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  180) Input/output
       Sequential read, force JPEG:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:277:8)
      at processImmediate (internal/timers.js:464:21)

  181) Input/output
       Not sequential read, force JPEG:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:291:8)
      at processImmediate (internal/timers.js:464:21)

  182) Input/output
       Support output to jpg format:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:305:8)
      at processImmediate (internal/timers.js:464:21)

  183) Input/output
       Support output to tif format:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:320:8)
      at processImmediate (internal/timers.js:464:21)

  184) Input/output
       Fail when input is invalid Buffer:
     Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/joshua/Projects/sharp/test/unit/io.js)
      at listOnTimeout (internal/timers.js:557:17)
      at processTimers (internal/timers.js:500:7)

  185) Input/output
       Fail when input file path is missing:
     Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/joshua/Projects/sharp/test/unit/io.js)
      at listOnTimeout (internal/timers.js:557:17)
      at processTimers (internal/timers.js:500:7)

  186) Input/output
       Promises/A+:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:464:8)
      at processImmediate (internal/timers.js:464:21)

  187) Input/output
       File input with corrupt header fails gracefully:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:479:8)
      at processImmediate (internal/timers.js:464:21)

  188) Input/output
       Buffer input with corrupt header fails gracefully:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:487:8)
      at processImmediate (internal/timers.js:464:21)

  189) Input/output
       Stream input with corrupt header fails gracefully:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:481:221)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  190) Input/output
       Input and output formats match when not forcing:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:583:8)
      at processImmediate (internal/timers.js:464:21)

  191) Input/output
       Can force output format with output chaining:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:597:8)
      at processImmediate (internal/timers.js:464:21)

  192) Input/output
       toFormat=JPEG takes precedence over WebP extension:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/io.js:607:8)
      at processImmediate (internal/timers.js:464:21)

  193) Input/output
       toFormat=WebP takes precedence over JPEG extension:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/io.js:617:8)
      at processImmediate (internal/timers.js:464:21)

  194) Input/output
       Load Vips V file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:627:8)
      at processImmediate (internal/timers.js:464:21)

  195) Input/output
       Save Vips V file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/io.js:641:8)
      at processImmediate (internal/timers.js:464:21)

  196) Input/output
       Fails when writing to missing directory:
     AssertionError [ERR_ASSERTION]: The input did not match the regular expression /unable to open for write/. Input:

'Error: A number was expected'

      at async Context.<anonymous> (test/unit/io.js:807:5)

  197) Input/output
       Queue length change events:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:882:8)
      at processImmediate (internal/timers.js:464:21)

  198) Input/output
       Info event data:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:478:132)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  199) Input/output
       Output filename with unknown extension
         Match JPEG input:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/io.js:515:10)
      at processImmediate (internal/timers.js:464:21)

  200) Input/output
       Output filename with unknown extension
         Match PNG input:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/io.js:528:10)
      at processImmediate (internal/timers.js:464:21)

  201) Input/output
       Output filename with unknown extension
         Match WebP input:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/io.js:541:10)
      at processImmediate (internal/timers.js:464:21)

  202) Input/output
       Output filename with unknown extension
         Match TIFF input:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/io.js:554:10)
      at processImmediate (internal/timers.js:464:21)

  203) Input/output
       Output filename with unknown extension
         Force JPEG format for PNG input:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/io.js:568:10)
      at processImmediate (internal/timers.js:464:21)

  204) Input/output
       Limit pixel count of input image
         Same size as input works:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at /Users/joshua/Projects/sharp/test/unit/io.js:689:14

  205) Input/output
       Limit pixel count of input image
         Disabling limit works:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:696:10)
      at processImmediate (internal/timers.js:464:21)

  206) Input/output
       Limit pixel count of input image
         Enabling default limit works and fails with a large image:

      AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected

+ 'A number was expected'
- 'Input image exceeds pixel limit'
      + expected - actual

      -A number was expected
      +Input image exceeds pixel limit
      
      at /Users/joshua/Projects/sharp/test/unit/io.js:706:18

  207) Input/output
       Limit pixel count of input image
         Smaller than input fails:

      AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected

+ 'A number was expected'
- 'Input image exceeds pixel limit'
      + expected - actual

      -A number was expected
      +Input image exceeds pixel limit
      
      at /Users/joshua/Projects/sharp/test/unit/io.js:720:22

  208) Input/output
       create new image
         RGB:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:823:10)
      at processImmediate (internal/timers.js:464:21)

  209) Input/output
       create new image
         RGBA:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/io.js:841:10)
      at processImmediate (internal/timers.js:464:21)

  210) Image channel insertion
       Grayscale to RGB, buffer:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/joinChannel.js:15:8)
      at processImmediate (internal/timers.js:464:21)

  211) Image channel insertion
       Grayscale to RGB, file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/joinChannel.js:29:8)
      at processImmediate (internal/timers.js:464:21)

  212) Image channel insertion
       Grayscale to RGBA, buffer:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/joinChannel.js:47:8)
      at processImmediate (internal/timers.js:464:21)

  213) Image channel insertion
       Grayscale to RGBA, file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/joinChannel.js:65:8)
      at processImmediate (internal/timers.js:464:21)

  214) Image channel insertion
       Grayscale to CMYK, buffers:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/joinChannel.js:84:8)
      at processImmediate (internal/timers.js:464:21)

  215) Image channel insertion
       Join raw buffers to RGB:
     Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/joshua/Projects/sharp/test/unit/joinChannel.js)
      at listOnTimeout (internal/timers.js:557:17)
      at processTimers (internal/timers.js:500:7)

  216) Image channel insertion
       Grayscale to RGBA, files, two arrays:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/joinChannel.js:130:8)
      at processImmediate (internal/timers.js:464:21)

  217) JPEG
       JPEG quality:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/jpeg.js:13:8)
      at processImmediate (internal/timers.js:464:21)

  218) JPEG
       Progressive JPEG image:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/jpeg.js:56:8)
      at processImmediate (internal/timers.js:464:21)

  219) JPEG
       Without chroma subsampling generates larger file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/jpeg.js:84:8)
      at processImmediate (internal/timers.js:464:21)

  220) JPEG
       Trellis quantisation:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/jpeg.js:119:8)
      at processImmediate (internal/timers.js:464:21)

  221) JPEG
       Overshoot deringing:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/jpeg.js:149:8)
      at processImmediate (internal/timers.js:464:21)

  222) JPEG
       Optimise scans generates different output length:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/jpeg.js:177:8)
      at processImmediate (internal/timers.js:464:21)

  223) JPEG
       Optimise coding generates smaller output length:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/jpeg.js:207:8)
      at processImmediate (internal/timers.js:464:21)

  224) JPEG
       Specifying quantisation table provides different JPEG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/jpeg.js:237:8)
      at processImmediate (internal/timers.js:464:21)

  225) JPEG
       Specifying quantization table provides different JPEG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/jpeg.js:268:8)
      at processImmediate (internal/timers.js:464:21)

  226) JPEG
       Can use mozjpeg defaults:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/jpeg.js:298:8)
      at processImmediate (internal/timers.js:464:21)

  227) Linear adjustment
       applies linear levels adjustment w/o alpha ch:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/linear.js:17:8)
      at processImmediate (internal/timers.js:464:21)

  228) Linear adjustment
       applies slope level adjustment w/o alpha ch:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/linear.js:26:8)
      at processImmediate (internal/timers.js:464:21)

  229) Linear adjustment
       applies offset level adjustment w/o alpha ch:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/linear.js:35:8)
      at processImmediate (internal/timers.js:464:21)

  230) Linear adjustment
       applies linear levels adjustment w alpha ch:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/linear.js:44:8)
      at processImmediate (internal/timers.js:464:21)

  231) Linear adjustment
       applies slope level adjustment w alpha ch:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/linear.js:53:8)
      at processImmediate (internal/timers.js:464:21)

  232) Linear adjustment
       applies offset level adjustment w alpha ch:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/linear.js:62:8)
      at processImmediate (internal/timers.js:464:21)

  233) Median filter
       1x1 window:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/median.js:13:8)
      at processImmediate (internal/timers.js:464:21)

  234) Median filter
       3x3 window:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/median.js:22:8)
      at processImmediate (internal/timers.js:464:21)

  235) Median filter
       7x7 window:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/median.js:31:8)
      at processImmediate (internal/timers.js:464:21)

  236) Median filter
       default window (3x3):
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/median.js:40:8)
      at processImmediate (internal/timers.js:464:21)

  237) Image metadata
       Resize to half width using metadata:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Object.<anonymous> (test/unit/metadata.js:484:52)

  238) Image metadata
       Keep EXIF metadata and add sRGB profile after a resize:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/metadata.js:498:8)
      at processImmediate (internal/timers.js:464:21)

  239) Image metadata
       Apply CMYK output ICC profile:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/metadata.js:529:8)
      at processImmediate (internal/timers.js:464:21)

  240) Image metadata
       Apply custom output ICC profile:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/metadata.js:554:8)
      at processImmediate (internal/timers.js:464:21)

  241) Image metadata
       Include metadata in output, enabled via empty object:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/metadata.js:564:8)
      at processImmediate (internal/timers.js:464:21)

  242) Image metadata
       Remove EXIF metadata after a resize:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/metadata.js:593:8)
      at processImmediate (internal/timers.js:464:21)

  243) Image metadata
       Remove metadata from PNG output:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/metadata.js:609:8)
      at processImmediate (internal/timers.js:464:21)

  244) Image metadata
       Add EXIF metadata to JPEG:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/metadata.js:638:8)
      at processImmediate (internal/timers.js:464:21)

  245) Image metadata
       Set density of JPEG:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/metadata.js:659:8)
      at processImmediate (internal/timers.js:464:21)

  246) Image metadata
       Set density of PNG:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/metadata.js:678:8)
      at processImmediate (internal/timers.js:464:21)

  247) Image metadata
       chromaSubsampling 4:4:4 RGB JPEG:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/metadata.js:696:8)
      at processImmediate (internal/timers.js:464:21)

  248) Image metadata
       isProgressive JPEG:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/metadata.js:710:8)
      at processImmediate (internal/timers.js:464:21)

  249) Image metadata
       isProgressive PNG:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/metadata.js:724:8)
      at processImmediate (internal/timers.js:464:21)

  250) Image metadata
       AVIF:

      AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected ... Lines skipped

  {
    channels: 3,
...
    height: 858,
    isProgressive: false,
+   pageHeight: 858,
    pagePrimary: 0,
...
    space: 'srgb',
    width: 2048
  }
      + expected - actual

         "hasAlpha": false
         "hasProfile": false
         "height": 858
         "isProgressive": false
      -  "pageHeight": 858
         "pagePrimary": 0
         "pages": 1
         "space": "srgb"
         "width": 2048
      
      at Context.<anonymous> (test/unit/metadata.js:751:12)

  251) Modulate
       should be able to hue-rotate:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/modulate.js:44:8)
      at processImmediate (internal/timers.js:464:21)

  252) Modulate
       should be able to brighten:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/modulate.js:60:8)
      at processImmediate (internal/timers.js:464:21)

  253) Modulate
       should be able to darken:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/modulate.js:76:8)
      at processImmediate (internal/timers.js:464:21)

  254) Modulate
       should be able to saturate:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/modulate.js:92:8)
      at processImmediate (internal/timers.js:464:21)

  255) Modulate
       should be able to desaturate:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/modulate.js:108:8)
      at processImmediate (internal/timers.js:464:21)

  256) Modulate
       should be able to lighten:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/modulate.js:124:8)
      at processImmediate (internal/timers.js:464:21)

  257) Modulate
       should be able to modulate all channels:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/modulate.js:140:8)
      at processImmediate (internal/timers.js:464:21)

  258) Modulate
       should be able to use linear and modulate together:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/modulate.js:160:8)
      at processImmediate (internal/timers.js:464:21)

  259) Modulate
       hue-rotate
         should hue rotate by 30 deg:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/modulate.js:176:12)
      at processImmediate (internal/timers.js:464:21)

  260) Modulate
       hue-rotate
         should hue rotate by 60 deg:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/modulate.js:176:12)
      at processImmediate (internal/timers.js:464:21)

  261) Modulate
       hue-rotate
         should hue rotate by 90 deg:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/modulate.js:176:12)
      at processImmediate (internal/timers.js:464:21)

  262) Modulate
       hue-rotate
         should hue rotate by 120 deg:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/modulate.js:176:12)
      at processImmediate (internal/timers.js:464:21)

  263) Modulate
       hue-rotate
         should hue rotate by 150 deg:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/modulate.js:176:12)
      at processImmediate (internal/timers.js:464:21)

  264) Modulate
       hue-rotate
         should hue rotate by 180 deg:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/modulate.js:176:12)
      at processImmediate (internal/timers.js:464:21)

  265) Modulate
       hue-rotate
         should hue rotate by 210 deg:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/modulate.js:176:12)
      at processImmediate (internal/timers.js:464:21)

  266) Modulate
       hue-rotate
         should hue rotate by 240 deg:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/modulate.js:176:12)
      at processImmediate (internal/timers.js:464:21)

  267) Modulate
       hue-rotate
         should hue rotate by 270 deg:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/modulate.js:176:12)
      at processImmediate (internal/timers.js:464:21)

  268) Modulate
       hue-rotate
         should hue rotate by 300 deg:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/modulate.js:176:12)
      at processImmediate (internal/timers.js:464:21)

  269) Modulate
       hue-rotate
         should hue rotate by 330 deg:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/modulate.js:176:12)
      at processImmediate (internal/timers.js:464:21)

  270) Modulate
       hue-rotate
         should hue rotate by 360 deg:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/modulate.js:176:12)
      at processImmediate (internal/timers.js:464:21)

  271) Negate
       negate (jpeg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/negate.js:13:8)
      at processImmediate (internal/timers.js:464:21)

  272) Negate
       negate (png):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/negate.js:26:8)
      at processImmediate (internal/timers.js:464:21)

  273) Negate
       negate (png, trans):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/negate.js:39:8)
      at processImmediate (internal/timers.js:464:21)

  274) Negate
       negate (png, alpha):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/negate.js:52:8)
      at processImmediate (internal/timers.js:464:21)

  275) Negate
       negate (webp):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/negate.js:65:8)
      at processImmediate (internal/timers.js:464:21)

  276) Negate
       negate (webp, trans):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/negate.js:78:8)
      at processImmediate (internal/timers.js:464:21)

  277) Negate
       negate (true):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/negate.js:91:8)
      at processImmediate (internal/timers.js:464:21)

  278) Negate
       negate (false):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/negate.js:104:8)
      at processImmediate (internal/timers.js:464:21)

  279) Negate
       negate ({alpha: true}):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/negate.js:115:8)
      at processImmediate (internal/timers.js:464:21)

  280) Negate
       negate non-alpha channels (png):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/negate.js:128:8)
      at processImmediate (internal/timers.js:464:21)

  281) Negate
       negate non-alpha channels (png, trans):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/negate.js:141:8)
      at processImmediate (internal/timers.js:464:21)

  282) Negate
       negate non-alpha channels (png, alpha):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/negate.js:154:8)
      at processImmediate (internal/timers.js:464:21)

  283) Negate
       negate non-alpha channels (webp):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/negate.js:167:8)
      at processImmediate (internal/timers.js:464:21)

  284) Negate
       negate non-alpha channels (webp, trans):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/negate.js:180:8)
      at processImmediate (internal/timers.js:464:21)

  285) Gaussian noise
       generate single-channel gaussian noise:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/noise.js:23:11)
      at processImmediate (internal/timers.js:464:21)

  286) Gaussian noise
       generate 3-channels gaussian noise:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/noise.js:52:11)
      at processImmediate (internal/timers.js:464:21)

  287) Gaussian noise
       overlay 3-channels gaussian noise over image:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/noise.js:81:11)
      at processImmediate (internal/timers.js:464:21)

  288) Gaussian noise
       overlay strong single-channel (sRGB) gaussian noise with 25% transparency over transparent png image:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/noise.js:134:8)
      at processImmediate (internal/timers.js:464:21)

  289) Normalization
       spreads rgb image values between 0 and 255:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/normalize.js:24:8)
      at processImmediate (internal/timers.js:464:21)

  290) Normalization
       spreads grayscaled image values between 0 and 255:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/normalize.js:37:8)
      at processImmediate (internal/timers.js:464:21)

  291) Normalization
       stretches greyscale images with alpha channel:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/normalize.js:48:8)
      at processImmediate (internal/timers.js:464:21)

  292) Normalization
       keeps an existing alpha channel:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/normalize.js:59:8)
      at processImmediate (internal/timers.js:464:21)

  293) Normalization
       keeps the alpha channel of greyscale images intact:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/normalize.js:75:8)
      at processImmediate (internal/timers.js:464:21)

  294) Normalization
       does not alter images with only one color:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/normalize.js:91:8)
      at processImmediate (internal/timers.js:464:21)

  295) Normalization
       works with 16-bit RGBA images:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/normalize.js:102:8)
      at processImmediate (internal/timers.js:464:21)

  296) PNG
       default compressionLevel generates smaller file than compressionLevel=0:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/png.js:27:8)
      at processImmediate (internal/timers.js:464:21)

  297) PNG
       without adaptiveFiltering generates smaller file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/png.js:50:8)
      at processImmediate (internal/timers.js:464:21)

  298) PNG
       Progressive PNG image:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/png.js:84:8)
      at processImmediate (internal/timers.js:464:21)

  299) PNG
       16-bit grey+alpha PNG identity transform:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/png.js:109:8)
      at processImmediate (internal/timers.js:464:21)

  300) PNG
       16-bit grey+alpha PNG roundtrip:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/png.js:118:8)
      at processImmediate (internal/timers.js:464:21)

  301) PNG
       palette decode/encode roundtrip:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/png.js:134:8)
      at processImmediate (internal/timers.js:464:21)

  302) PNG
       Valid PNG libimagequant quality value produces image of same size or smaller:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/png.js:152:72)
      at processImmediate (internal/timers.js:464:21)

  303) PNG
       Valid PNG libimagequant colours value produces image of same size or smaller:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/png.js:174:62)
      at processImmediate (internal/timers.js:464:21)

  304) PNG
       Valid PNG libimagequant dither value produces image of same size or smaller:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/png.js:196:61)
      at processImmediate (internal/timers.js:464:21)

  305) Raw pixel data
       Raw pixel input
         RGB:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:57:10)
      at processImmediate (internal/timers.js:464:21)

  306) Raw pixel data
       Raw pixel input
         RGBA:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:86:10)
      at processImmediate (internal/timers.js:464:21)

  307) Raw pixel data
       Raw pixel input
         RGBA premultiplied:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:115:10)
      at processImmediate (internal/timers.js:464:21)

  308) Raw pixel data
       Raw pixel input
         JPEG to raw Stream and back again:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:479:7)
      at Sharp._read (lib/output.js:469:240)
      at Sharp.Readable.read (internal/streams/readable.js:465:10)
      at resume_ (internal/streams/readable.js:963:12)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  309) Raw pixel data
       Output raw, uncompressed image data
         1 channel greyscale image:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:188:10)
      at processImmediate (internal/timers.js:464:21)

  310) Raw pixel data
       Output raw, uncompressed image data
         3 channel colour image without transparency:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:204:10)
      at processImmediate (internal/timers.js:464:21)

  311) Raw pixel data
       Output raw, uncompressed image data
         4 channel colour image with transparency:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:219:10)
      at processImmediate (internal/timers.js:464:21)

  312) Raw pixel data
       Output raw, uncompressed image data
         Extract A from RGBA:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:236:10)
      at processImmediate (internal/timers.js:464:21)

  313) Raw pixel data
       Raw pixel depths
         Uint8Array:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:268:12)
      at processImmediate (internal/timers.js:464:21)

  314) Raw pixel data
       Raw pixel depths
         Uint8Array:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:268:12)
      at processImmediate (internal/timers.js:464:21)

  315) Raw pixel data
       Raw pixel depths
         Uint8ClampedArray:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:268:12)
      at processImmediate (internal/timers.js:464:21)

  316) Raw pixel data
       Raw pixel depths
         Int8Array:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:268:12)
      at processImmediate (internal/timers.js:464:21)

  317) Raw pixel data
       Raw pixel depths
         Uint16Array:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:268:12)
      at processImmediate (internal/timers.js:464:21)

  318) Raw pixel data
       Raw pixel depths
         Int16Array:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:268:12)
      at processImmediate (internal/timers.js:464:21)

  319) Raw pixel data
       Raw pixel depths
         Uint32Array:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:268:12)
      at processImmediate (internal/timers.js:464:21)

  320) Raw pixel data
       Raw pixel depths
         Int32Array:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:268:12)
      at processImmediate (internal/timers.js:464:21)

  321) Raw pixel data
       Raw pixel depths
         Float32Array:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:268:12)
      at processImmediate (internal/timers.js:464:21)

  322) Raw pixel data
       Raw pixel depths
         Float64Array:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/raw.js:268:12)
      at processImmediate (internal/timers.js:464:21)

  323) Recomb
       applies a sepia filter using recomb:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/recomb.js:19:8)
      at processImmediate (internal/timers.js:464:21)

  324) Recomb
       applies a sepia filter using recomb to an PNG with Alpha:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/recomb.js:37:8)
      at processImmediate (internal/timers.js:464:21)

  325) Recomb
       recomb with a single channel input:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/recomb.js:60:8)
      at processImmediate (internal/timers.js:464:21)

  326) Recomb
       applies a different sepia filter using recomb:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/recomb.js:73:8)
      at processImmediate (internal/timers.js:464:21)

  327) Recomb
       increases the saturation of the image:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/recomb.js:107:8)
      at processImmediate (internal/timers.js:464:21)

  328) Resize fit=contain
       Allows specifying the position as a string:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:16:8)
      at processImmediate (internal/timers.js:464:21)

  329) Resize fit=contain
       JPEG within PNG, no alpha channel:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:28:8)
      at processImmediate (internal/timers.js:464:21)

  330) Resize fit=contain
       JPEG within WebP, to include alpha channel:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:46:8)
      at processImmediate (internal/timers.js:464:21)

  331) Resize fit=contain
       PNG with alpha channel:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:60:8)
      at processImmediate (internal/timers.js:464:21)

  332) Resize fit=contain
       16-bit PNG with alpha channel:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:74:8)
      at processImmediate (internal/timers.js:464:21)

  333) Resize fit=contain
       16-bit PNG with alpha channel onto RGBA:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:91:8)
      at processImmediate (internal/timers.js:464:21)

  334) Resize fit=contain
       PNG with 2 channels:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:108:8)
      at processImmediate (internal/timers.js:464:21)

  335) Resize fit=contain
       TIFF in LAB colourspace onto RGBA background:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:126:8)
      at processImmediate (internal/timers.js:464:21)

  336) Resize fit=contain
       Enlarge:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:140:8)
      at processImmediate (internal/timers.js:464:21)

  337) Resize fit=contain
       Position horizontal top:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:202:8)
      at processImmediate (internal/timers.js:464:21)

  338) Resize fit=contain
       Position horizontal right top:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:220:8)
      at processImmediate (internal/timers.js:464:21)

  339) Resize fit=contain
       Position horizontal right:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:238:8)
      at processImmediate (internal/timers.js:464:21)

  340) Resize fit=contain
       Position horizontal right bottom:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:256:8)
      at processImmediate (internal/timers.js:464:21)

  341) Resize fit=contain
       Position horizontal bottom:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:274:8)
      at processImmediate (internal/timers.js:464:21)

  342) Resize fit=contain
       Position horizontal left bottom:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:292:8)
      at processImmediate (internal/timers.js:464:21)

  343) Resize fit=contain
       Position horizontal left:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:310:8)
      at processImmediate (internal/timers.js:464:21)

  344) Resize fit=contain
       Position horizontal left top:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:328:8)
      at processImmediate (internal/timers.js:464:21)

  345) Resize fit=contain
       Position horizontal north:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:346:8)
      at processImmediate (internal/timers.js:464:21)

  346) Resize fit=contain
       Position horizontal northeast:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:364:8)
      at processImmediate (internal/timers.js:464:21)

  347) Resize fit=contain
       Position horizontal east:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:382:8)
      at processImmediate (internal/timers.js:464:21)

  348) Resize fit=contain
       Position horizontal southeast:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:400:8)
      at processImmediate (internal/timers.js:464:21)

  349) Resize fit=contain
       Position horizontal south:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:418:8)
      at processImmediate (internal/timers.js:464:21)

  350) Resize fit=contain
       Position horizontal southwest:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:436:8)
      at processImmediate (internal/timers.js:464:21)

  351) Resize fit=contain
       Position horizontal west:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:454:8)
      at processImmediate (internal/timers.js:464:21)

  352) Resize fit=contain
       Position horizontal northwest:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:472:8)
      at processImmediate (internal/timers.js:464:21)

  353) Resize fit=contain
       Position horizontal center:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:490:8)
      at processImmediate (internal/timers.js:464:21)

  354) Resize fit=contain
       Position vertical top:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:508:8)
      at processImmediate (internal/timers.js:464:21)

  355) Resize fit=contain
       Position vertical right top:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:526:8)
      at processImmediate (internal/timers.js:464:21)

  356) Resize fit=contain
       Position vertical right:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:544:8)
      at processImmediate (internal/timers.js:464:21)

  357) Resize fit=contain
       Position vertical right bottom:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:562:8)
      at processImmediate (internal/timers.js:464:21)

  358) Resize fit=contain
       Position vertical bottom:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:580:8)
      at processImmediate (internal/timers.js:464:21)

  359) Resize fit=contain
       Position vertical left bottom:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:598:8)
      at processImmediate (internal/timers.js:464:21)

  360) Resize fit=contain
       Position vertical left:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:616:8)
      at processImmediate (internal/timers.js:464:21)

  361) Resize fit=contain
       Position vertical left top:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:634:8)
      at processImmediate (internal/timers.js:464:21)

  362) Resize fit=contain
       Position vertical north:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:652:8)
      at processImmediate (internal/timers.js:464:21)

  363) Resize fit=contain
       Position vertical northeast:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:670:8)
      at processImmediate (internal/timers.js:464:21)

  364) Resize fit=contain
       Position vertical east:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:688:8)
      at processImmediate (internal/timers.js:464:21)

  365) Resize fit=contain
       Position vertical southeast:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:706:8)
      at processImmediate (internal/timers.js:464:21)

  366) Resize fit=contain
       Position vertical south:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:724:8)
      at processImmediate (internal/timers.js:464:21)

  367) Resize fit=contain
       Position vertical southwest:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:742:8)
      at processImmediate (internal/timers.js:464:21)

  368) Resize fit=contain
       Position vertical west:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:760:8)
      at processImmediate (internal/timers.js:464:21)

  369) Resize fit=contain
       Position vertical northwest:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:778:8)
      at processImmediate (internal/timers.js:464:21)

  370) Resize fit=contain
       Position vertical center:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:796:8)
      at processImmediate (internal/timers.js:464:21)

  371) Resize fit=contain
       Animated WebP
         Width only:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:158:10)
      at processImmediate (internal/timers.js:464:21)

  372) Resize fit=contain
       Animated WebP
         Height only:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-contain.js:175:10)
      at processImmediate (internal/timers.js:464:21)

  373) Resize fit=cover
       Position: top:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  374) Resize fit=cover
       Position: right:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  375) Resize fit=cover
       Position: bottom:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  376) Resize fit=cover
       Position: left:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  377) Resize fit=cover
       Position: right top (top):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  378) Resize fit=cover
       Position: right top (right):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  379) Resize fit=cover
       Position: right bottom (bottom):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  380) Resize fit=cover
       Position: right bottom (right):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  381) Resize fit=cover
       Position: left bottom (bottom):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  382) Resize fit=cover
       Position: left bottom (left):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  383) Resize fit=cover
       Position: left top (top):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  384) Resize fit=cover
       Position: left top (left):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  385) Resize fit=cover
       Gravity: north:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  386) Resize fit=cover
       Gravity: east:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  387) Resize fit=cover
       Gravity: south:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  388) Resize fit=cover
       Gravity: west:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  389) Resize fit=cover
       Gravity: center:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  390) Resize fit=cover
       Gravity: centre:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  391) Resize fit=cover
       Default (centre):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  392) Resize fit=cover
       Gravity: northeast (north):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  393) Resize fit=cover
       Gravity: northeast (east):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  394) Resize fit=cover
       Gravity: southeast (south):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  395) Resize fit=cover
       Gravity: southeast (east):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  396) Resize fit=cover
       Gravity: southwest (south):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  397) Resize fit=cover
       Gravity: southwest (west):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  398) Resize fit=cover
       Gravity: northwest (north):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  399) Resize fit=cover
       Gravity: northwest (west):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:208:10)
      at processImmediate (internal/timers.js:464:21)

  400) Resize fit=cover
       Allows specifying the gravity as a string:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:223:8)
      at processImmediate (internal/timers.js:464:21)

  401) Resize fit=cover
       Skip crop when post-resize dimensions are at target:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:255:8)
      at processImmediate (internal/timers.js:464:21)

  402) Resize fit=cover
       Animated WebP
         Width only:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:276:10)
      at processImmediate (internal/timers.js:464:21)

  403) Resize fit=cover
       Animated WebP
         Height only:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:287:10)
      at processImmediate (internal/timers.js:464:21)

  404) Resize fit=cover
       Entropy-based strategy
         JPEG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:303:10)
      at processImmediate (internal/timers.js:464:21)

  405) Resize fit=cover
       Entropy-based strategy
         PNG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:321:10)
      at processImmediate (internal/timers.js:464:21)

  406) Resize fit=cover
       Entropy-based strategy
         supports the strategy passed as a string:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:339:10)
      at processImmediate (internal/timers.js:464:21)

  407) Resize fit=cover
       Entropy-based strategy
         Animated image rejects:
     AssertionError [ERR_ASSERTION]: The input did not match the regular expression /Resize strategy is not supported for multi-page images/. Input:

'Error: A number was expected'

  

  408) Resize fit=cover
       Attention strategy
         JPEG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:371:10)
      at processImmediate (internal/timers.js:464:21)

  409) Resize fit=cover
       Attention strategy
         PNG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:389:10)
      at processImmediate (internal/timers.js:464:21)

  410) Resize fit=cover
       Attention strategy
         supports the strategy passed as a string:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize-cover.js:407:10)
      at processImmediate (internal/timers.js:464:21)

  411) Resize fit=cover
       Attention strategy
         Animated image rejects:
     AssertionError [ERR_ASSERTION]: The input did not match the regular expression /Resize strategy is not supported for multi-page images/. Input:

'Error: A number was expected'

  

  412) Resize dimensions
       Exact crop:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:10:47)
      at processImmediate (internal/timers.js:464:21)

  413) Resize dimensions
       Fixed width:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:21:42)
      at processImmediate (internal/timers.js:464:21)

  414) Resize dimensions
       Fixed height:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:32:48)
      at processImmediate (internal/timers.js:464:21)

  415) Resize dimensions
       Identity transform:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:43:30)
      at processImmediate (internal/timers.js:464:21)

  416) Resize dimensions
       Upscale:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:56:8)
      at processImmediate (internal/timers.js:464:21)

  417) Resize dimensions
       Invalid width - too large:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:106:8)
      at processImmediate (internal/timers.js:464:21)

  418) Resize dimensions
       Invalid height - too large:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:117:8)
      at processImmediate (internal/timers.js:464:21)

  419) Resize dimensions
       WebP shrink-on-load rounds to zero, ensure recalculation is correct:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:128:8)
      at processImmediate (internal/timers.js:464:21)

  420) Resize dimensions
       JPEG shrink-on-load with 90 degree rotation, ensure recalculation is correct:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:148:8)
      at processImmediate (internal/timers.js:464:21)

  421) Resize dimensions
       TIFF embed known to cause rounding errors:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:168:8)
      at processImmediate (internal/timers.js:464:21)

  422) Resize dimensions
       TIFF known to cause rounding errors:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:182:8)
      at processImmediate (internal/timers.js:464:21)

  423) Resize dimensions
       fit=inside, portrait:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:196:8)
      at processImmediate (internal/timers.js:464:21)

  424) Resize dimensions
       fit=outside, portrait:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:210:8)
      at processImmediate (internal/timers.js:464:21)

  425) Resize dimensions
       fit=inside, landscape:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:223:8)
      at processImmediate (internal/timers.js:464:21)

  426) Resize dimensions
       fit=outside, landscape:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:236:8)
      at processImmediate (internal/timers.js:464:21)

  427) Resize dimensions
       fit=inside, provide only one dimension:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:252:8)
      at processImmediate (internal/timers.js:464:21)

  428) Resize dimensions
       fit=outside, provide only one dimension:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:268:8)
      at processImmediate (internal/timers.js:464:21)

  429) Resize dimensions
       Do not enlarge when input width is already less than output width:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:284:8)
      at processImmediate (internal/timers.js:464:21)

  430) Resize dimensions
       Do not enlarge when input height is already less than output height:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:300:8)
      at processImmediate (internal/timers.js:464:21)

  431) Resize dimensions
       Do crop when fit = cover and withoutEnlargement = true and width >= outputWidth, and height < outputHeight:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:317:8)
      at processImmediate (internal/timers.js:464:21)

  432) Resize dimensions
       Do crop when fit = cover and withoutEnlargement = true and width < outputWidth, and height >= outputHeight:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:334:8)
      at processImmediate (internal/timers.js:464:21)

  433) Resize dimensions
       Do enlarge when input width is less than output width:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:350:8)
      at processImmediate (internal/timers.js:464:21)

  434) Resize dimensions
       Do enlarge when input width is less than output width:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:366:8)
      at processImmediate (internal/timers.js:464:21)

  435) Resize dimensions
       Do enlarge when input height is less than output height:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:382:8)
      at processImmediate (internal/timers.js:464:21)

  436) Resize dimensions
       Do not crop when fit = cover and withoutReduction = true and width >= outputWidth, and height < outputHeight:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:399:8)
      at processImmediate (internal/timers.js:464:21)

  437) Resize dimensions
       Do not crop when fit = cover and withoutReduction = true and width < outputWidth, and height >= outputHeight:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:416:8)
      at processImmediate (internal/timers.js:464:21)

  438) Resize dimensions
       Do enlarge when input width is less than output width:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:432:8)
      at processImmediate (internal/timers.js:464:21)

  439) Resize dimensions
       Do not resize when both withoutEnlargement and withoutReduction are true:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:445:8)
      at processImmediate (internal/timers.js:464:21)

  440) Resize dimensions
       Do not reduce size when fit = outside and withoutReduction are true and height > outputHeight and width > outputWidth:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:458:8)
      at processImmediate (internal/timers.js:464:21)

  441) Resize dimensions
       Do resize when fit = outside and withoutReduction are true and input height > height and input width > width :
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:471:8)
      at processImmediate (internal/timers.js:464:21)

  442) Resize dimensions
       fit=fill, downscale width and height:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:484:8)
      at processImmediate (internal/timers.js:464:21)

  443) Resize dimensions
       fit=fill, downscale width:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:500:8)
      at processImmediate (internal/timers.js:464:21)

  444) Resize dimensions
       fit=fill, downscale height:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:516:8)
      at processImmediate (internal/timers.js:464:21)

  445) Resize dimensions
       fit=fill, upscale width and height:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:529:8)
      at processImmediate (internal/timers.js:464:21)

  446) Resize dimensions
       fit=fill, upscale width:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:542:8)
      at processImmediate (internal/timers.js:464:21)

  447) Resize dimensions
       fit=fill, upscale height:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:555:8)
      at processImmediate (internal/timers.js:464:21)

  448) Resize dimensions
       fit=fill, downscale width, upscale height:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:568:8)
      at processImmediate (internal/timers.js:464:21)

  449) Resize dimensions
       fit=fill, upscale width, downscale height:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:581:8)
      at processImmediate (internal/timers.js:464:21)

  450) Resize dimensions
       fit=fill, identity transform:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:594:8)
      at processImmediate (internal/timers.js:464:21)

  451) Resize dimensions
       Dimensions that result in differing even shrinks on each axis:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:607:8)
      at processImmediate (internal/timers.js:464:21)

  452) Resize dimensions
       Dimensions that result in differing odd shrinks on each axis:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:625:8)
      at processImmediate (internal/timers.js:464:21)

  453) Resize dimensions
       fastShrinkOnLoad: false ensures image is not shifted:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:644:8)
      at processImmediate (internal/timers.js:464:21)

  454) Resize dimensions
       fastShrinkOnLoad: true (default) might result in shifted image:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:656:8)
      at processImmediate (internal/timers.js:464:21)

  455) Resize dimensions
       kernel nearest:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:674:10)
      at processImmediate (internal/timers.js:464:21)

  456) Resize dimensions
       kernel cubic:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:674:10)
      at processImmediate (internal/timers.js:464:21)

  457) Resize dimensions
       kernel mitchell:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:674:10)
      at processImmediate (internal/timers.js:464:21)

  458) Resize dimensions
       kernel lanczos2:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:674:10)
      at processImmediate (internal/timers.js:464:21)

  459) Resize dimensions
       kernel lanczos3:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:674:10)
      at processImmediate (internal/timers.js:464:21)

  460) Resize dimensions
       nearest upsampling with integral factor:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:687:8)
      at processImmediate (internal/timers.js:464:21)

  461) Resize dimensions
       Ensure shortest edge (height) is at least 1 pixel:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:705:8)
      at processImmediate (internal/timers.js:464:21)

  462) Resize dimensions
       Ensure shortest edge (width) is at least 1 pixel:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:722:8)
      at processImmediate (internal/timers.js:464:21)

  463) Resize dimensions
       Ensure embedded shortest edge (height) is at least 1 pixel:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:739:8)
      at processImmediate (internal/timers.js:464:21)

  464) Resize dimensions
       Ensure embedded shortest edge (width) is at least 1 pixel:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:756:8)
      at processImmediate (internal/timers.js:464:21)

  465) Resize dimensions
       Skip shrink-on-load where one dimension <4px:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/resize.js:773:8)
      at processImmediate (internal/timers.js:464:21)

  466) Rotation
       Input image has Orientation EXIF tag value of (1), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  467) Rotation
       Input image has Orientation EXIF tag value of (2), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  468) Rotation
       Input image has Orientation EXIF tag value of (3), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  469) Rotation
       Input image has Orientation EXIF tag value of (4), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  470) Rotation
       Input image has Orientation EXIF tag value of (5), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  471) Rotation
       Input image has Orientation EXIF tag value of (6), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  472) Rotation
       Input image has Orientation EXIF tag value of (7), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  473) Rotation
       Input image has Orientation EXIF tag value of (8), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  474) Rotation
       Input image has Orientation EXIF tag value of (1), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  475) Rotation
       Input image has Orientation EXIF tag value of (2), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  476) Rotation
       Input image has Orientation EXIF tag value of (3), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  477) Rotation
       Input image has Orientation EXIF tag value of (4), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  478) Rotation
       Input image has Orientation EXIF tag value of (5), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  479) Rotation
       Input image has Orientation EXIF tag value of (6), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  480) Rotation
       Input image has Orientation EXIF tag value of (7), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  481) Rotation
       Input image has Orientation EXIF tag value of (8), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:15:12)
      at processImmediate (internal/timers.js:464:21)

  482) Rotation
       Rotate by 30 degrees with semi-transparent background:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:31:8)
      at processImmediate (internal/timers.js:464:21)

  483) Rotation
       Rotate by 30 degrees with solid background:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:44:8)
      at processImmediate (internal/timers.js:464:21)

  484) Rotation
       Rotate by 90 degrees, respecting output input size:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:54:58)
      at processImmediate (internal/timers.js:464:21)

  485) Rotation
       Rotate by 30 degrees, respecting output input size:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:65:58)
      at processImmediate (internal/timers.js:464:21)

  486) Rotation
       Rotate by any 90-multiple angle (-3690deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:77:53)
      at processImmediate (internal/timers.js:464:21)

  487) Rotation
       Rotate by any 90-multiple angle (-450deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:77:53)
      at processImmediate (internal/timers.js:464:21)

  488) Rotation
       Rotate by any 90-multiple angle (-90deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:77:53)
      at processImmediate (internal/timers.js:464:21)

  489) Rotation
       Rotate by any 90-multiple angle (90deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:77:53)
      at processImmediate (internal/timers.js:464:21)

  490) Rotation
       Rotate by any 90-multiple angle (450deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:77:53)
      at processImmediate (internal/timers.js:464:21)

  491) Rotation
       Rotate by any 90-multiple angle (3690deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:77:53)
      at processImmediate (internal/timers.js:464:21)

  492) Rotation
       Rotate by any 30-multiple angle (-3750deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:88:53)
      at processImmediate (internal/timers.js:464:21)

  493) Rotation
       Rotate by any 30-multiple angle (-510deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:88:53)
      at processImmediate (internal/timers.js:464:21)

  494) Rotation
       Rotate by any 30-multiple angle (-150deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:88:53)
      at processImmediate (internal/timers.js:464:21)

  495) Rotation
       Rotate by any 30-multiple angle (30deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:88:53)
      at processImmediate (internal/timers.js:464:21)

  496) Rotation
       Rotate by any 30-multiple angle (390deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:88:53)
      at processImmediate (internal/timers.js:464:21)

  497) Rotation
       Rotate by any 30-multiple angle (3630deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:88:53)
      at processImmediate (internal/timers.js:464:21)

  498) Rotation
       Rotate by any 180-multiple angle (-3780deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:99:53)
      at processImmediate (internal/timers.js:464:21)

  499) Rotation
       Rotate by any 180-multiple angle (-540deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:99:53)
      at processImmediate (internal/timers.js:464:21)

  500) Rotation
       Rotate by any 180-multiple angle (0deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:99:53)
      at processImmediate (internal/timers.js:464:21)

  501) Rotation
       Rotate by any 180-multiple angle (180deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:99:53)
      at processImmediate (internal/timers.js:464:21)

  502) Rotation
       Rotate by any 180-multiple angle (540deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:99:53)
      at processImmediate (internal/timers.js:464:21)

  503) Rotation
       Rotate by any 180-multiple angle (3780deg):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:99:53)
      at processImmediate (internal/timers.js:464:21)

  504) Rotation
       Rotate by 270 degrees, square output ignoring aspect ratio:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:112:8)
      at processImmediate (internal/timers.js:464:21)

  505) Rotation
       Rotate by 315 degrees, square output ignoring aspect ratio:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:129:8)
      at processImmediate (internal/timers.js:464:21)

  506) Rotation
       Rotate by 270 degrees, rectangular output ignoring aspect ratio:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:146:8)
      at processImmediate (internal/timers.js:464:21)

  507) Rotation
       Rotate by 30 degrees, rectangular output ignoring aspect ratio:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:163:8)
      at processImmediate (internal/timers.js:464:21)

  508) Rotation
       Input image has Orientation EXIF tag but do not rotate output:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:180:8)
      at processImmediate (internal/timers.js:464:21)

  509) Rotation
       Input image has Orientation EXIF tag value of 8 (270 degrees), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:198:8)
      at processImmediate (internal/timers.js:464:21)

  510) Rotation
       Override EXIF Orientation tag metadata after auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:212:8)
      at processImmediate (internal/timers.js:464:21)

  511) Rotation
       Input image has Orientation EXIF tag value of 5 (270 degrees + flip), auto-rotate:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:230:8)
      at processImmediate (internal/timers.js:464:21)

  512) Rotation
       Attempt to auto-rotate using image that has no EXIF:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:244:51)
      at processImmediate (internal/timers.js:464:21)

  513) Rotation
       Attempt to auto-rotate image format without EXIF support:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:259:8)
      at processImmediate (internal/timers.js:464:21)

  514) Rotation
       Animated image rotate-then-extract rejects:
     AssertionError [ERR_ASSERTION]: The input did not match the regular expression /Rotate is not supported for multi-page images/. Input:

'Error: A number was expected'

  

  515) Rotation
       Animated image extract-then-rotate rejects:
     AssertionError [ERR_ASSERTION]: The input did not match the regular expression /Rotate is not supported for multi-page images/. Input:

'Error: A number was expected'

  

  516) Rotation
       Flip - vertical:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:308:8)
      at processImmediate (internal/timers.js:464:21)

  517) Rotation
       Flop - horizontal:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:326:8)
      at processImmediate (internal/timers.js:464:21)

  518) Rotation
       Flip and flop:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:343:8)
      at processImmediate (internal/timers.js:464:21)

  519) Rotation
       Neither flip nor flop:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:357:8)
      at processImmediate (internal/timers.js:464:21)

  520) Rotation
       Auto-rotate and flip:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:371:8)
      at processImmediate (internal/timers.js:464:21)

  521) Rotation
       Auto-rotate and flop:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/rotate.js:385:8)
      at processImmediate (internal/timers.js:464:21)

  522) Sharpen
       specific radius 10 (sigma 6):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/sharpen.js:13:8)
      at processImmediate (internal/timers.js:464:21)

  523) Sharpen
       specific radius 3 (sigma 1.5) and levels 0.5, 2.5:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/sharpen.js:26:8)
      at processImmediate (internal/timers.js:464:21)

  524) Sharpen
       specific radius 5 (sigma 3.5) and levels 2, 4:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/sharpen.js:39:8)
      at processImmediate (internal/timers.js:464:21)

  525) Sharpen
       specific radius/levels with alpha channel:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/sharpen.js:53:10)
      at processImmediate (internal/timers.js:464:21)

  526) Sharpen
       mild sharpen:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/sharpen.js:68:8)
      at processImmediate (internal/timers.js:464:21)

  527) Sharpen
       sharpened image is larger than non-sharpened:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/sharpen.js:99:8)
      at processImmediate (internal/timers.js:464:21)

  528) Image Stats
       Blurred image has lower sharpness than original:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/stats.js:677:53)
      at processImmediate (internal/timers.js:464:21)

  529) SVG input
       Convert SVG to PNG at default 72DPI:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/svg.js:15:8)
      at processImmediate (internal/timers.js:464:21)

  530) SVG input
       Convert SVG to PNG at 1200DPI:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/svg.js:36:8)
      at processImmediate (internal/timers.js:464:21)

  531) SVG input
       Convert SVG to PNG at DPI larger than 2400:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Object.<anonymous> (test/unit/svg.js:60:10)

  532) SVG input
       Convert SVG to PNG utilizing scale-on-load:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/svg.js:82:8)
      at processImmediate (internal/timers.js:464:21)

  533) SVG input
       Convert SVG to PNG at 14.4DPI:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/svg.js:101:8)
      at processImmediate (internal/timers.js:464:21)

  534) SVG input
       Convert SVG with embedded images to PNG, respecting dimensions, autoconvert to PNG:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/svg.js:115:8)
      at processImmediate (internal/timers.js:464:21)

  535) SVG input
       Converts SVG with truncated embedded PNG:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/svg.js:132:52)
      at processImmediate (internal/timers.js:464:21)

  536) Threshold
       threshold 1 jpeg:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/threshold.js:13:8)
      at processImmediate (internal/timers.js:464:21)

  537) Threshold
       threshold 40 jpeg:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/threshold.js:26:8)
      at processImmediate (internal/timers.js:464:21)

  538) Threshold
       threshold 128:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/threshold.js:39:8)
      at processImmediate (internal/timers.js:464:21)

  539) Threshold
       threshold true (=128):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/threshold.js:52:8)
      at processImmediate (internal/timers.js:464:21)

  540) Threshold
       threshold false (=0):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/threshold.js:64:8)
      at processImmediate (internal/timers.js:464:21)

  541) Threshold
       threshold grayscale: true (=128):
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/threshold.js:74:8)
      at processImmediate (internal/timers.js:464:21)

  542) Threshold
       threshold default jpeg:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/threshold.js:87:8)
      at processImmediate (internal/timers.js:464:21)

  543) Threshold
       threshold default png transparency:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/threshold.js:100:8)
      at processImmediate (internal/timers.js:464:21)

  544) Threshold
       threshold default png alpha:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/threshold.js:113:8)
      at processImmediate (internal/timers.js:464:21)

  545) Threshold
       threshold default webp transparency:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/threshold.js:125:8)
      at processImmediate (internal/timers.js:464:21)

  546) Threshold
       color threshold:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/threshold.js:136:8)
      at processImmediate (internal/timers.js:464:21)

  547) TIFF
       Load TIFF from Buffer:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/tiff.js:19:8)
      at processImmediate (internal/timers.js:464:21)

  548) TIFF
       Load multi-page TIFF from file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/tiff.js:33:8)
      at processImmediate (internal/timers.js:464:21)

  549) TIFF
       Load multi-page TIFF from Buffer:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/tiff.js:57:8)
      at processImmediate (internal/timers.js:464:21)

  550) TIFF
       Save TIFF to Buffer:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/tiff.js:80:8)
      at processImmediate (internal/timers.js:464:21)

  551) TIFF
       Increasing TIFF quality increases file size:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/tiff.js:95:8)
      at processImmediate (internal/timers.js:464:21)

  552) TIFF
       Not squashing TIFF to a bit depth of 1 should not change the file size:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tiff.js:127:8)
      at processImmediate (internal/timers.js:464:21)

  553) TIFF
       Squashing TIFF to a bit depth of 1 should significantly reduce file size:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tiff.js:144:8)
      at processImmediate (internal/timers.js:464:21)

  554) TIFF
       TIFF setting xres and yres on file:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tiff.js:165:8)
      at processImmediate (internal/timers.js:464:21)

  555) TIFF
       TIFF setting xres and yres on buffer:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/tiff.js:182:8)
      at processImmediate (internal/timers.js:464:21)

  556) TIFF
       TIFF imputes xres and yres from withMetadataDensity if not explicitly provided:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/tiff.js:196:8)
      at processImmediate (internal/timers.js:464:21)

  557) TIFF
       TIFF uses xres and yres over withMetadataDensity if explicitly provided:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/tiff.js:206:8)
      at processImmediate (internal/timers.js:464:21)

  558) TIFF
       TIFF lzw compression with horizontal predictor shrinks test file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tiff.js:230:8)
      at processImmediate (internal/timers.js:464:21)

  559) TIFF
       TIFF LZW RGBA toFile:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tiff.js:251:8)
      at processImmediate (internal/timers.js:464:21)

  560) TIFF
       TIFF LZW RGBA toBuffer:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/tiff.js:269:8)
      at processImmediate (internal/timers.js:464:21)

  561) TIFF
       TIFF ccittfax4 compression shrinks b-w test file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tiff.js:283:8)
      at processImmediate (internal/timers.js:464:21)

  562) TIFF
       TIFF deflate compression with horizontal predictor shrinks test file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tiff.js:298:8)
      at processImmediate (internal/timers.js:464:21)

  563) TIFF
       TIFF deflate compression with float predictor shrinks test file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tiff.js:313:8)
      at processImmediate (internal/timers.js:464:21)

  564) TIFF
       TIFF deflate compression without predictor shrinks test file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tiff.js:328:8)
      at processImmediate (internal/timers.js:464:21)

  565) TIFF
       TIFF jpeg compression shrinks test file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tiff.js:342:8)
      at processImmediate (internal/timers.js:464:21)

  566) TIFF
       TIFF tiled pyramid image without compression enlarges test file:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tiff.js:414:8)
      at processImmediate (internal/timers.js:464:21)

  567) TIFF
       TIFF file input with invalid page fails gracefully:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/tiff.js:484:8)
      at processImmediate (internal/timers.js:464:21)

  568) TIFF
       TIFF buffer input with invalid page fails gracefully:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/tiff.js:492:8)
      at processImmediate (internal/timers.js:464:21)

  569) Tile
       Deep Zoom layout:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:320:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  570) Tile
       Deep Zoom layout with custom size+overlap:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:340:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  571) Tile
       Deep Zoom layout with custom size+angle:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:362:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  572) Tile
       Deep Zoom layout with depth of one:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:396:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  573) Tile
       Deep Zoom layout with depth of onepixel:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:412:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  574) Tile
       Deep Zoom layout with depth of onetile:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:428:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  575) Tile
       Deep Zoom layout with skipBlanks:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:444:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  576) Tile
       Zoomify layout:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:462:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  577) Tile
       Zoomify layout with depth one:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:488:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  578) Tile
       Zoomify layout with depth onetile:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:509:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  579) Tile
       Zoomify layout with depth onepixel:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:530:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  580) Tile
       Zoomify layout with skip blanks:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:551:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  581) Tile
       Google layout:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:573:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  582) Tile
       Google layout with jpeg format:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:600:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  583) Tile
       Google layout with png format:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:637:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  584) Tile
       Google layout with webp format:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:675:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  585) Tile
       Google layout with depth one:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:711:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  586) Tile
       Google layout with depth onepixel:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:733:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  587) Tile
       Google layout with depth onetile:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:755:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  588) Tile
       Google layout with default skip Blanks:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:776:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  589) Tile
       Google layout with center image in tile:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:801:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  590) Tile
       Google layout with center image in tile centre:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:821:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  591) Tile
       IIIFv2 layout:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:843:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  592) Tile
       IIIFv3 layout:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:873:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  593) Tile
       Write to ZIP container using file extension:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:900:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  594) Tile
       Write to ZIP container using container tile option:
     Uncaught Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at /Users/joshua/Projects/sharp/test/unit/tile.js:933:10
      at next (node_modules/rimraf/rimraf.js:69:7)
      at CB (node_modules/rimraf/rimraf.js:100:9)
      at /Users/joshua/Projects/sharp/node_modules/rimraf/rimraf.js:138:14
      at FSReqCallback.oncomplete (fs.js:191:21)

  595) Timeout
       Will timeout after 1s when performing slow blur operation:
     AssertionError [ERR_ASSERTION]: The input did not match the regular expression /timeout: [0-9]+% complete/. Input:

'Error: A number was expected'

  

  596) Tint
       tints rgb image red:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tint.js:14:8)
      at processImmediate (internal/timers.js:464:21)

  597) Tint
       tints rgb image green:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tint.js:27:8)
      at processImmediate (internal/timers.js:464:21)

  598) Tint
       tints rgb image blue:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tint.js:40:8)
      at processImmediate (internal/timers.js:464:21)

  599) Tint
       tints rgb image with sepia tone:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tint.js:53:8)
      at processImmediate (internal/timers.js:464:21)

  600) Tint
       tints rgb image with sepia tone with rgb colour:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tint.js:67:8)
      at processImmediate (internal/timers.js:464:21)

  601) Tint
       tints rgb image with alpha channel:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tint.js:81:8)
      at processImmediate (internal/timers.js:464:21)

  602) Tint
       tints cmyk image red:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toFile (lib/output.js:33:955)
      at Context.<anonymous> (test/unit/tint.js:95:8)
      at processImmediate (internal/timers.js:464:21)

  603) toBuffer
       reusing same sharp object does not reset previously passed parameters to toBuffer:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/toBuffer.js:11:29)
      at processImmediate (internal/timers.js:464:21)

  604) toBuffer
       correctly process animated webp with height > 16383:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/toBuffer.js:21:8)
      at processImmediate (internal/timers.js:464:21)

  605) toFormat
       accepts upper case characters as format parameter (string):
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/toFormat.js:12:8)
      at processImmediate (internal/timers.js:464:21)

  606) toFormat
       accepts upper case characters as format parameter (object):
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/toFormat.js:22:8)
      at processImmediate (internal/timers.js:464:21)

  607) Trim borders
       Threshold default:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/trim.js:15:8)
      at processImmediate (internal/timers.js:464:21)

  608) Trim borders
       Skip shrink-on-load:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/trim.js:34:8)
      at processImmediate (internal/timers.js:464:21)

  609) Trim borders
       single colour PNG where alpha channel provides the image:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/trim.js:47:8)
      at processImmediate (internal/timers.js:464:21)

  610) Trim borders
       16-bit PNG with alpha channel:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/trim.js:63:8)
      at processImmediate (internal/timers.js:464:21)

  611) Trim borders
       Attempt to trim 2x2 pixel image fails:

      AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected

+ 'Image to trim must be at least 3x3 pixels'
- 'A number was expected'
      + expected - actual

      -Image to trim must be at least 3x3 pixels
      +A number was expected
      
      at /Users/joshua/Projects/sharp/test/unit/trim.js:91:16

  612) Trim borders
       should rotate before trim:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/trim.js:108:8)
      at processImmediate (internal/timers.js:464:21)

  613) Trim borders
       Animated image rejects:
     AssertionError [ERR_ASSERTION]: The input did not match the regular expression /Trim is not supported for multi-page images/. Input:

'Error: A number was expected'

  

  614) WebP
       WebP output:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/webp.js:14:8)
      at processImmediate (internal/timers.js:464:21)

  615) WebP
       should work for webp alpha quality:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/webp.js:39:8)
      at processImmediate (internal/timers.js:464:21)

  616) WebP
       should work for webp lossless:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/webp.js:50:8)
      at processImmediate (internal/timers.js:464:21)

  617) WebP
       should work for webp near-lossless:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/webp.js:61:8)
      at processImmediate (internal/timers.js:464:21)

  618) WebP
       should use near-lossless when both lossless and nearLossless are specified:
     Error: A number was expected
      at Sharp._pipeline (lib/output.js:476:7)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/webp.js:72:8)
      at processImmediate (internal/timers.js:464:21)

  619) WebP
       should produce a larger file size using smartSubsample:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/webp.js:84:8)
      at processImmediate (internal/timers.js:464:21)

  620) WebP
       should produce a smaller file size with increased effort:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/webp.js:106:8)
      at processImmediate (internal/timers.js:464:21)

  621) WebP
       should repeat a single delay for all frames:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/webp.js:159:8)
      at processImmediate (internal/timers.js:464:21)

  622) WebP
       should limit animation loop:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/webp.js:168:8)
      at processImmediate (internal/timers.js:464:21)

  623) WebP
       should change delay between frames:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/webp.js:180:8)

  624) WebP
       should work with streams when only animated is set:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:475:130)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  625) WebP
       should work with streams when only pages is set:
     Uncaught Error: A number was expected
      at Sharp.<anonymous> (lib/output.js:475:130)
      at finish (internal/streams/writable.js:657:10)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  626) WebP
       should resize animated image to page height:
     Error: A number was expected
      at /Users/joshua/Projects/sharp/lib/output.js:482:96
      at new Promise (<anonymous>)
      at Sharp._pipeline (lib/output.js:482:8)
      at Sharp.toBuffer (lib/output.js:87:488)
      at Context.<anonymous> (test/unit/webp.js:214:8)
      at processImmediate (internal/timers.js:464:21)



npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! [email protected] test-unit: `nyc --reporter=lcov --branches=99 mocha --slow=1000 --timeout=60000 ./test/unit/*.js`
npm ERR! Exit status 255
npm ERR! 
npm ERR! Failed at the [email protected] test-unit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/joshua/.npm/_logs/2022-01-18T10_27_39_448Z-debug.log
npm ERR! Test failed.  See above for more details.

@lovell
Copy link
Owner

lovell commented Jan 18, 2022

/usr/local/bin/node -p "process.arch" => x64

Thanks, it looks like you're using Rosetta emulation.

What's the output of running npm i --build-from-source on the main branch? Does npm t pass after that?

@jpike88
Copy link
Author

jpike88 commented Jan 18, 2022

npm i --build-from-source results in an error:


joshua@Macbooks-MacBook-Pro-3 sharp % npm i --build-from-source
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated

> [email protected] install /Users/joshua/Projects/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)

sharp: Using existing vendored libvips v8.12.1
  TOUCH Release/obj.target/libvips-cpp.stamp
  CC(target) Release/obj.target/nothing/node_modules/node-addon-api/nothing.o
  LIBTOOL-STATIC Release/nothing.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
  CXX(target) Release/obj.target/sharp-darwin-x64/src/common.o
../src/common.cc:24:10: fatal error: 'vips/vips8' file not found
#include <vips/vips8>
         ^~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/sharp-darwin-x64/src/common.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Darwin 21.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/joshua/Projects/sharp
gyp ERR! node -v v14.18.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/joshua/.npm/_logs/2022-01-18T10_54_00_936Z-debug.log


@lovell
Copy link
Owner

lovell commented Jan 18, 2022

Please can you npm run clean (or at least delete the vendor directory) before doing this.

@jpike88
Copy link
Author

jpike88 commented Jan 18, 2022

Ok install succeeded, but tests results in a segmentation fault too:


joshua@Macbooks-MacBook-Pro-3 sharp % npm i --build-from-source
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated

> [email protected] install /Users/joshua/Projects/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)

sharp: Using cached /Users/joshua/.npm/_libvips/libvips-8.12.1-darwin-x64.tar.br
sharp: Integrity check passed for darwin-x64
  TOUCH Release/obj.target/libvips-cpp.stamp
  CC(target) Release/obj.target/nothing/node_modules/node-addon-api/nothing.o
  LIBTOOL-STATIC Release/nothing.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
  CXX(target) Release/obj.target/sharp-darwin-x64/src/common.o
  CXX(target) Release/obj.target/sharp-darwin-x64/src/metadata.o
  CXX(target) Release/obj.target/sharp-darwin-x64/src/stats.o
  CXX(target) Release/obj.target/sharp-darwin-x64/src/operations.o
  CXX(target) Release/obj.target/sharp-darwin-x64/src/pipeline.o
  CXX(target) Release/obj.target/sharp-darwin-x64/src/utilities.o
  CXX(target) Release/obj.target/sharp-darwin-x64/src/sharp.o
  SOLINK_MODULE(target) Release/sharp-darwin-x64.node
npm notice created a lockfile as package-lock.json. You should commit this file.
added 1116 packages from 626 contributors in 72.084s

168 packages are looking for funding
  run `npm fund` for details

joshua@Macbooks-MacBook-Pro-3 sharp % npm run test\
> 
joshua@Macbooks-MacBook-Pro-3 sharp % npm run test 

> [email protected] test /Users/joshua/Projects/sharp
> npm run test-lint && npm run test-unit && npm run test-licensing


> [email protected] test-lint /Users/joshua/Projects/sharp
> semistandard && cpplint


> [email protected] test-unit /Users/joshua/Projects/sharp
> nyc --reporter=lcov --branches=99 mocha --slow=1000 --timeout=60000 ./test/unit/*.js



  Affine transform
    ✔ Applies identity matrix
    ✔ Applies resize affine matrix
sh: line 1: 93045 Segmentation fault: 11  npm run test-unit
npm ERR! code ELIFECYCLE
npm ERR! errno 139
npm ERR! [email protected] test: `npm run test-lint && npm run test-unit && npm run test-licensing`
npm ERR! Exit status 139
npm ERR! 
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/joshua/.npm/_logs/2022-01-18T11_53_22_726Z-debug.log


@lovell
Copy link
Owner

lovell commented Jan 18, 2022

Thanks, this looks like it might be a problem with Rosetta emulation specific to the M1 Max.

Are you able to install a native Node.js 16, with process.arch of arm64, and see if you can reproduce?

@jpike88
Copy link
Author

jpike88 commented Jan 19, 2022

I switched to 16 with process.arch of arm64, and tests pass fine.

@lovell
Copy link
Owner

lovell commented Jan 19, 2022

Thanks for confirming. I know many people successfully run sharp under Rosetta emulation on M1 devices, so this is likely to be a new bug/feature in Apple's Rosetta emulation specific to either the M1 Max CPU and/or macOS Monterey.

To be able to help further, I'll need a backtrace of the crash using a minimal test case.

Run gdb node (ensure this is Node.js 14) then at the (gdb) prompt type run minimal-test-case-that-crashes.js, wait for the crash then type bt for a backtrace.

@lovell lovell changed the title Segmentation Fault on M1 Mac Segmentation Fault under Rosetta emulation, Node.js 14, M1 Max, macOS Monterey Jan 19, 2022
@jpike88
Copy link
Author

jpike88 commented Jan 19, 2022

I can't even install gdb, brew install gdb has no bottle found, and trying to build from source is a problem too. Is there an alternative?

@lovell
Copy link
Owner

lovell commented Jan 19, 2022

You might be able to use lldb instead, which should be included as part of xcode.

@jpike88
Copy link
Author

jpike88 commented Jan 19, 2022


joshua@Macbooks-MacBook-Pro-3 aquipa % lldb node          
(lldb) target create "node"
Current executable set to 'node' (x86_64).
(lldb) run minimal-test.js 
Process 17418 launched: '/usr/local/bin/node' (x86_64)
Generated 18 resources for Android
WARN:	Source icon "./client/cordova/resources/icon.png" contains alpha channel, generated icons for iOS will not.

	Apple recommends avoiding transparency. See the App Icon Human Interface Guidelines[1] for details. Any transparency in your icon will be filled in with white.

	[1]: https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/app-icon/

Process 17418 stopped
* thread #56, name = 'pool', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000000000000
error: memory read failed for 0x0
  thread #63, name = 'pool', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000000000000
error: memory read failed for 0x0
  thread #68, name = 'pool', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000000000000
error: memory read failed for 0x0
Target 0: (node) stopped.
(lldb) bt
* thread #56, name = 'pool', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000000000000
    frame #1: 0x0000000000000003
    frame #2: 0x0000000100000004 node`_mh_execute_header + 4
(lldb) 


my minimal-test.js


import pkg from 'cordova-res';
const { run } = pkg;

const options = {
	directory: 'client/cordova',
	resourcesDirectory: 'resources',
	logstream: process.stdout,
	platforms: {
		android: {
			icon: {
				sources: ['./client/cordova/resources/icon.png'],
			},
			splash: {
				sources: ['./client/cordova/resources/splash.png'],
			},
		},
		ios: {
			icon: {
				sources: ['./client/cordova/resources/icon.png'],
			},
			splash: {
				sources: ['./client/cordova/resources/splash.png'],
			},
		},
	},
};
run(options);

@lovell
Copy link
Owner

lovell commented Jan 19, 2022

Thanks, that looks like a fairly generic EXC_BAD_ACCESS segfault when accessing null memory, which still points to an emulation problem.

It might be worth ensuring you're using the latest Rosetta emulator, perhaps via a forced uninstall/reinstall.

If you're still having this problem, a smaller, more focussed test case that uses only sharp would be really useful to help pinpoint exactly which format/operation might be causing this. From your comments above this might be based on the following test case:

sharp/test/unit/affine.js

Lines 93 to 102 in 1ff84b2

it('Resizes and applies affine transform', done => {
const input = fixtures.inputJpg;
sharp(input)
.resize(500, 500)
.affine([[0.5, 1], [1, 0.5]])
.toBuffer((err, data) => {
if (err) throw err;
fixtures.assertSimilar(data, fixtures.expected('affine-resize-expected.jpg'), done);
});
});

@jpike88
Copy link
Author

jpike88 commented Jan 20, 2022

In a minimal mocha test suite file, like below:

'use strict';

const assert = require('assert');

const sharp = require('./');
const fixtures = require('./test/fixtures');

describe('Affine transform', () => {

    it('Applies affine transform with background color and all offsets', done => {
      sharp(fixtures.inputJpg320x240)
        .rotate(180)
        .affine([[-1.2, 1.8], [-1, 2]], { background: 'yellow', idx: 10, idy: -40, odx: 10, ody: -50 })
        .toBuffer((err, data) => {
          if (err) throw err;
          fixtures.assertSimilar(fixtures.expected('affine-background-all-offsets-expected.jpg'), data, done);
        });
    });
  
    describe('Interpolations', () => {
      const input = fixtures.inputJpg320x240;
      const inputWidth = 320;
      const inputHeight = 240;
      for (const interp in sharp.interpolators) {
        it(`Performs 2x upscale with ${interp} interpolation`, done => {
          sharp(input)
            .affine([[2, 0], [0, 2]], { interpolator: sharp.interpolators[interp] })
            .toBuffer((err, data, info) => {
              if (err) throw err;
              assert.strictEqual(info.width, Math.ceil(inputWidth * 2));
              assert.strictEqual(info.height, Math.ceil(inputHeight * 2));
              fixtures.assertSimilar(fixtures.expected(`affine-${sharp.interpolators[interp]}-2x-upscale-expected.jpg`), data, done);
            });
        });
        return;
      }
    });
  });
  

I put in a return statement in that for loop so it just runs once. So in total, sharp will only run twice: once in first test, and the 1st time in the for loop before its forced to exit.

I think run $(npm bin)/mocha --slow=1000 --timeout=60000 ./testTemp.js

Weirdness here:

  • If I remove the 'Applies affine transform with background color and all offsets' test block, the second one runs fine
  • If I remove the describe interpolations block (removing the 2nd run), the first one runs fine
  • If I have both running, one after another, I get a zsh: segmentation fault error.

I eventually pinpointed the problem line:

fixtures.assertSimilar(fixtures.expected(`affine-${sharp.interpolators[interp]}-2x-upscale-expected.jpg`), data, done);

which brought me to:

fingerprint(actualImage, function (err, actualFingerprint) { in test/fixtures/index.js

The image was test/fixtures/fixtures.inputJpg320x240. What's odd is that in my original test file, it's used as an input for the first test too and runs fine.

This points to the interpolator being the culprit, or at least one of them: nearest. If I remove the interpolater parameter, the test passes ok.

@lovell
Copy link
Owner

lovell commented Jan 24, 2022

Great research, thank you for doing this.

Nearest neighbour interpolation is relatively simple - it pretty much copies memory, so perhaps there's an optimisation being used for this in the x64 code that the M1 Max Rosetta emulator can't handle? These binaries are built using clang on macOS Catalina.

I guess the next step might be to create a tiny test case that can reproduce this, ideally as a separate, minimalist repo, then ask Apple (with their annual revenue of USD365,000,000,000) to investigate.

On a related note, I've added Rosetta emulation to the CI running on an M1 Mac mini (Big Sur) via commit 3b370b6 to try to catch similar problems - see https://github.com/lovell/sharp/runs/4920230048?check_suite_focus=true for a successful run.

@jpike88
Copy link
Author

jpike88 commented Jan 25, 2022

The thing I don't got is why both tests need to run in order for the second one to fail

@lovell
Copy link
Owner

lovell commented Feb 3, 2022

I guess it's possible that JIT optimisation has recompiled some bytecode by the second invocation, which if so adds more fuel to the fire of this being a bug in the Rosetta emulator.

@lovell
Copy link
Owner

lovell commented Feb 9, 2022

Are you able to test with v0.30.1 as it contains a fix for a possible memory problem that we uncovered by running with the "wrong" libgobject - see #3082

There's also a somewhat-related issue that mentions M1 Pro, Rosetta and gobject here - Homebrew/homebrew-core#88801

@jpike88
Copy link
Author

jpike88 commented Feb 10, 2022

looks like it worked, all tests are passing!

@lovell lovell added this to the v0.30.1 milestone Feb 10, 2022
@lovell
Copy link
Owner

lovell commented Feb 10, 2022

Brilliant, thanks for confirming.

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

No branches or pull requests

2 participants