Skip to content
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

Compile error: Cannot find module '@simplewebauthn/typescript-types' or its corresponding type declarations #135

Open
bmeredith opened this issue May 28, 2024 · 0 comments

Comments

@bmeredith
Copy link

bmeredith commented May 28, 2024

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

  1. git clone https://github.com/bmeredith/zerodev-error
  2. npm install
  3. npx tsc
  4. Error occurs

Current workaround

Install @simplewebauthn/typescript-types (^8.2.3) as a package within my project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant