-
Notifications
You must be signed in to change notification settings - Fork 63
Compile errors @aws-crypto/material-management with @types/node >= 16.0.2 #722
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
Comments
This can probably be closed then? :) |
Seeing (what I think is the same error) using typescript
index.js import { NodeMaterialsManager } from '@aws-crypto/client-node' tsc --noEmit --allowJS --checkJs index.js
node_modules/@aws-crypto/material-management-node/build/main/src/material_helpers.d.ts:3:10 - error TS2724: '"crypto"' has no exported member named 'Signer'. Did you mean 'Sign'?
3 import { Signer, Verify, createCipheriv, createDecipheriv } from 'crypto';
~~~~~~
node_modules/@types/node/crypto.d.ts:1320:11
1320 class Sign extends stream.Writable {
~~~~
'Sign' is declared here.
Found 1 error. interesting/weirdly - installing (downgrading) to npm install @types/[email protected] |
Howdy @sandfox , @tomasstrejcek , @cernytomas The latest release of the ESDK-JavaScript supports Node 16. Much Obliged, |
Problem:
Cannot build Typescript project using @aws-crypto/material-management and @types/node >= 16.0.2
Solution:
This issue is due to wrong type definition of crypto
Sign
class (previouslySigner
) fixed in DefinitelyTyped/DefinitelyTyped#54394released with @types/[email protected]
Update @types/node to version 16.0.2 or higher
Rename
Signer
toSign
This solution will be breaking change for developers using @types/node < 16.0.2
The text was updated successfully, but these errors were encountered: