You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default behaviour of libvips is to cache input files, which can lead to EBUSY or EPERM errors on Windows.
Use sharp.cache(false) to switch this feature off.
Adding sharp.cache(false) does not fix this problem.
Does this problem relate to images appearing to have been rotated by 90 degrees?
Images that contain EXIF Orientation metadata are not auto-oriented. By default, EXIF metadata is removed.
To auto-orient pixel values use the parameter-less rotate() operation.
Using rotate() or keepExif() does not fix this problem.
What are the steps to reproduce?
Run npm lint or open a project using sharp in an IDE with typescript support, which worked with v0.34.5.
It will show errors like:
Could not find a declaration file for module sharp. /<DIR>/node_modules/sharp/dist/index.mjs implicitly has an any type. There are types at /<DIR>/node_modules/sharp/lib/index.d.ts, but this result could not be resolved when respecting package.json “exports”. The sharp library may need to update its package.json or typings. (ts 7016)
error Unsafe call of a type that could not be resolved @typescript-eslint/no-unsafe-call
What is the expected behaviour?
Lint runs through fine, no issues in IDE, type resolving works normally.
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem
I tried setting up a codepen but it didn't work, I don't have more time to spend on this, sorry.
Please provide sample image(s) that help explain this problem
Possible bug
Is this a possible bug in a feature of sharp, unrelated to installation?
npm install sharpcompletes without error.node -e "import 'sharp'"completes without error.If you cannot confirm both of these, please open an installation issue instead.
Are you using the latest version of sharp?
sharpas reported bynpm view sharp dist-tags.latest.If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.
If you are using another package which depends on a version of
sharpthat is not the latest, please open an issue against that package instead.What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp?Does this problem relate to file caching?
The default behaviour of libvips is to cache input files, which can lead to
EBUSYorEPERMerrors on Windows.Use
sharp.cache(false)to switch this feature off.sharp.cache(false)does not fix this problem.Does this problem relate to images appearing to have been rotated by 90 degrees?
Images that contain EXIF Orientation metadata are not auto-oriented. By default, EXIF metadata is removed.
To auto-orient pixel values use the parameter-less
rotate()operation.To retain EXIF Orientation use
keepExif().Using
rotate()orkeepExif()does not fix this problem.What are the steps to reproduce?
npm lintor open a project using sharp in an IDE with typescript support, which worked with v0.34.5.What is the expected behaviour?
Lint runs through fine, no issues in IDE, type resolving works normally.
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem
I tried setting up a codepen but it didn't work, I don't have more time to spend on this, sorry.
Please provide sample image(s) that help explain this problem
This is not related to images.