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

Overwriting the input files failes in Node v16.4.1 #57

Closed
KasparEtter opened this issue Jul 4, 2021 · 1 comment
Closed

Overwriting the input files failes in Node v16.4.1 #57

KasparEtter opened this issue Jul 4, 2021 · 1 comment
Labels
Milestone

Comments

@KasparEtter
Copy link

sharp resize 100 --input '*.png' --output '{dir}'

works in Node v14.17.2 but fails in Node v16.4.1 with the following error message:

The value of "position" is out of range. It must be an integer. Received Infinity

By inserting logger.error(err.stack) in index.js, I got the following stack trace:

RangeError [ERR_OUT_OF_RANGE]: The value of "position" is out of range. It must be an integer. Received Infinity
    at read (node:fs:653:3)
    at node:internal/util:335:7
    at new Promise (<anonymous>)
    at read (node:internal/util:321:12)
    at Readable.read [as _read] (/[…]/sharp-cli/node_modules/rw-stream/index.js:43:39)
    at Readable.read (node:internal/streams/readable:483:10)
    at resume_ (node:internal/streams/readable:981:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
@vseventer vseventer added this to the v2.0.0 milestone Jun 18, 2022
@vseventer vseventer added the bug label Jun 18, 2022
@vseventer
Copy link
Owner

Fixed in v2.0.0.

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

No branches or pull requests

2 participants