@uppy/thumbnail-generator exifr.orientation is not a function
See original GitHub issueThe error
Upon requesting a thumbnail image, the following error is thrown:
TypeError: exifr.orientation is not a function
at ThumbnailGenerator.createThumbnail ((index):44693)
at ThumbnailGenerator.requestThumbnail ((index):44917)
This points to this line:
const orientationPromise = exifr.orientation(file.data).catch(_err => 1)
Related commits
fc3b50a76afdd92e00f70fddec87d3ee4e7354f4 a6bfd8123b09cd195ee6087f34b454f12b2632bc
My code
thumbnailGenerator.requestThumbnail(uppyFile);
Versions
Compiled with typescript.
Broken:
@uppy/thumbnail-generator: 1.5.7
@uppy/dashboard: 1.8.0
exifr: 4.3.5
Broken:
@uppy/thumbnail-generator: 1.5.6
@uppy/dashboard: 1.7.0
exifr: 4.3.4
Working:
@uppy/thumbnail-generator: 1.5.5 (manually locked; 1.5.7 will be auto-installed)
@uppy/dashboard: 1.6.2
exifr: not installed
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Exifr NPM - npm.io
Only extracts photo's orientation. Returns object with instructions how to rotate the image: deg <number> : angle in degrees (i.e. 180 ), useful...
Read more >Rotating an image based on exif orientation in javascript
I found this link but when I try to implement it in my web app, the image does not show up on the...
Read more >exifr - npm
Start using exifr in your project by running `npm i exifr`. There are 56 other projects in the npm registry using exifr.
Read more >exifr - README
This package provides a thin wrapper around ExifTool allowing the reading of image file metadata with a single command. Installation. You will need...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Okay,
rollup
with defaultcommonjs
could not handlecjs
…Hello, i was about to look into it 😄 sorry for the inconvinience.
Exifr is written as ESM and transpiled to both ESM and UMD. But since the current disarray with js/mjs/cjs and
"type":"module"
in package.json i decided to include each bundle (mini, lite, full) in two identical variants with both js/mjs and js/cjs extensions. So there’sdist/mini.umd.js
===dist/mini.umd.cjs
,dist/lite.esm.js
===dist/lite.esm.mjs
, etc…In the PR I decided to go with cjs, but i didn’t expect it cause any problem since it would compile and work just fine. Anyway, I’m glad it’s fixed 👍