Namespace 'sharp' has no exported member 'SharpInstance'
See original GitHub issueAfter upgrading from 0.20 to 0.21 I got the follwoing error:
[tsl] ERROR in /home/travis/build/zxing-js/library/src/test/core/util/SharpImage.ts(8,32)
TS2694: Namespace 'sharp' has no exported member 'SharpInstance'.
I’m using sharp as this:
// https://github.com/zxing-js/library/blob/master/src/test/core/util/SharpImage.ts
import * as sharp from 'sharp';
import BitMatrix from '../../../core/common/BitMatrix';
export default class SharpImage {
public constructor(
private wrapper: sharp.SharpInstance,
private buffer: Uint8ClampedArray,
private width: number,
private height: number
) { }
// ...
}
How can I get SharpInstance
in this new version?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Namespace 'NodeJS' has no exported member 'Require'
I believe this problem happened because of an old version of @types/node , as Angular uses TypeScript as its backbone.
Read more >Module Has No Exported Member? : r/typescript - Reddit
It just exports a single namespace, not individual types. It's not tree-shaking compatible either.
Read more >“namespace nodejs has no exported member global” Code ...
e issue and is due the older version of @types/node dependency. Updating @types/node to version 14.14.33 or above solved the issue.
Read more >Namespace has no exported member 'LocationState'-node.js
[Solved]-Namespace has no exported member 'LocationState'-node.js. Search. score:0. Your version of @types/react-router-dom is too old, try upgrading to a ...
Read more >Module firebase/app' has no exported member 'firestore'
https://codedocu.com/Software/Angular/Angular-Error/Solved-Angular-Firebase-Fehler-TS2305_colon_-Module-firebase/app- has - no - exported - member - ...
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 FreeTop 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
Top GitHub Comments
Just for future reference, the
SharpInstance
interface was renamed to justSharp
.Hello, problems with the
@types/sharp
module should be reported downstream against the https://github.com/DefinitelyTyped/DefinitelyTyped repo.