question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Namespace 'sharp' has no exported member 'SharpInstance'

See original GitHub issue

After 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
odahcamcommented, Nov 6, 2018

Just for future reference, the SharpInstance interface was renamed to just Sharp.

1reaction
lovellcommented, Nov 6, 2018

Hello, problems with the @types/sharp module should be reported downstream against the https://github.com/DefinitelyTyped/DefinitelyTyped repo.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found