Skip to content

App breaks without optional peer dependency @simplewebauthn/browser installed #262

@MasterCarl

Description

@MasterCarl

After upgrading from 0.4.4 to 0.5.0, I'm getting runtime errors such as

webauthn.js?v=1346bd92:2 Uncaught (in promise) SyntaxError: The requested module '/_nuxt/@id/__vite-optional-peer-dep:@simplewebauthn/browser:nuxt-auth-utils' does not provide an export named 'browserSupportsWebAuthn' (at webauthn.js?v=1346bd92:2:3)

The error originates from

import {browserSupportsWebAuthn, browserSupportsWebAuthnAutofill, platformAuthenticatorIsAvailable, startAuthentication, startRegistration} from "/_nuxt/@id/__vite-optional-peer-dep:@simplewebauthn/browser:nuxt-auth-utils";

Installing @simplewebauthn/browser fixes this issue, but that should be optional since I'm using

export default defineNuxtConfig({
auth: {
    webAuthn: false,
  }
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions