Compile error: Cannot find module '@simplewebauthn/typescript-types' or its corresponding type declarations
Opened this issue · 0 comments
bmeredith commented
After installing @zerodev/permissions
and referencing a type from @zerodev/permissions/signers
, compilation fails with the following error:
node_modules/@zerodev/permissions/signers/toWebAuthnSigner.ts:1:60 - error TS2307: Cannot find module '@simplewebauthn/typescript-types' or its corresponding type declarations.
1 import type { PublicKeyCredentialRequestOptionsJSON } from "@simplewebauthn/typescript-types"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error in node_modules/@zerodev/permissions/signers/toWebAuthnSigner.ts:1
It looks like @zerodev/permissions
uses @simplewebauthn/browser
v9.0.1
. In v9.0.0
it seems there was a breaking change that renamed @simplewebauthn/typescript-types
to @simplewebauthn/types
which is likely the culprit:
https://github.com/MasterKale/SimpleWebAuthn/releases/tag/v9.0.0
Minimum reproduction code
I've setup a small repo in order to reproduce the issue:
https://github.com/bmeredith/zerodev-error
Steps to Reproduce
git clone https://github.com/bmeredith/zerodev-error
npm install
npx tsc
- Error occurs
Current workaround
Install @simplewebauthn/typescript-types
(^8.2.3
) as a package within my project.