Skip to content

Duplicated imports "createRouteMatcher" on Nuxt #5214

@llbarre

Description

@llbarre

Preliminary Checks

Reproduction

https://github.com/clerk/clerk-nuxt-quickstart

Publishable key

pk_test_YXBwYXJlbnQtZmxhbWluZ28tNy5jbGVyay5hY2NvdW50cy5kZXYk

Description

The Nuxt implementation of clerk seems to be pretty fragile. The quickstart project has warnings and it won't build either.

[3:44:35 PM] WARN Duplicated imports "createRouteMatcher", the one from "/Users/llbarre/Development/clerk-nuxt-quickstart/node_modules/.pnpm/@clerk+nuxt@1.2.0_magicast@0.3.5_react@19.0.0_vue@3.5.13_typescript@5.7.3_/node_modules/@clerk/nuxt/dist/runtime/client/index.js" has been ignored and "/Users/llbarre/Development/clerk-nuxt-quickstart/node_modules/.pnpm/@clerk+nuxt@1.2.0_magicast@0.3.5_react@19.0.0_vue@3.5.13_typescript@5.7.3_/node_modules/@clerk/nuxt/dist/runtime/client/routeMatcher.js" is used

Steps to reproduce:

  1. Install dependencies
  2. Run dev

Expected behavior:

No console warnings. Successful build.

Actual behavior:

[3:44:35 PM] WARN Duplicated imports "createRouteMatcher", the one from "/Users/llbarre/Development/clerk-nuxt-quickstart/node_modules/.pnpm/@clerk+nuxt@1.2.0_magicast@0.3.5_react@19.0.0_vue@3.5.13_typescript@5.7.3_/node_modules/@clerk/nuxt/dist/runtime/client/index.js" has been ignored and "/Users/llbarre/Development/clerk-nuxt-quickstart/node_modules/.pnpm/@clerk+nuxt@1.2.0_magicast@0.3.5_react@19.0.0_vue@3.5.13_typescript@5.7.3_/node_modules/@clerk/nuxt/dist/runtime/client/routeMatcher.js" is used

Environment

System:
    OS: macOS 15.3
    CPU: (16) arm64 Apple M3 Max
    Memory: 14.05 GB / 128.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.13.0 - /usr/local/bin/node
    npm: 10.2.5 - ~/.npm-global/bin/npm
    pnpm: 9.14.2 - ~/.npm-global/bin/pnpm
  Browsers:
    Chrome: 133.0.6943.127
    Safari: 18.3
  npmPackages:
    @clerk/nuxt: ^1.1.4 => 1.2.0 
    nuxt: ^3.15.1 => 3.15.4 
    vue: ^3.5.13 => 3.5.13 
    vue-router: ^4.4.5 => 4.5.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions