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

injection "Symbol(nuxt-ui.locale-context)" not found #3549

Closed
moshetanzer opened this issue Mar 13, 2025 · 7 comments · Fixed by #3603
Closed

injection "Symbol(nuxt-ui.locale-context)" not found #3549

moshetanzer opened this issue Mar 13, 2025 · 7 comments · Fixed by #3603
Labels
bug Something isn't working pro v3 #1289

Comments

@moshetanzer
Copy link
Contributor

Environment

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3

Reproduction

see below

Description

I get the follwing error:

runtime-core.esm-bundler.js:51  [Vue warn]: injection "Symbol(nuxt-ui.locale-context)" not found. 
  at <USlideover open=false onUpdate:open=fn side="left"  ... > 
  at <UDashboardSidebar collapsible="" resizable="" > 
  at <Primitive as=undefined class="fixed inset-0 flex overflow-hidden" > 
  at <UDashboardGroup> 
  at <Default ref=Ref< undefined > > 
  at <AsyncComponentWrapper ref=Ref< undefined > > 
  at <LayoutLoader key="default" layoutProps= Object name="default" > 
  at <NuxtLayoutProvider layoutProps= Object key="default" name="default"  ... > 
  at <NuxtLayout> 
  at <App key=4 > 
  at <NuxtRoot>

when usinng the DashboardSidebar component:

 <UDashboardSidebar
      collapsible
      resizable
    >
      <template #header>
        <div class="flex items-center gap-2">
          <UIcon
            name="i-solar-buildings-2-bold"
            class="w-7 h-7"
          />
          <span class="flex items-center gap-2 font-semibold text-lg logo">example</span>
        </div>
      </template>
      <UNavigationMenu
        orientation="vertical"
        :items="links"
      />
      <div class="flex-1" />
      <UNavigationMenu
        orientation="vertical"
        :items="footerLinks"
      />
      <USeparator class="sticky bottom-0" />
      <template #footer>
        <span class="text-xs text-neutral-500 tracking-tight">Version {{ useRuntimeConfig().public.version }}</span>
      </template>
    </UDashboardSidebar>

Additional context

No response

Logs

@moshetanzer moshetanzer added bug Something isn't working triage v3 #1289 labels Mar 13, 2025
@finnbuster
Copy link

I can also report that I'm experiencing this after updating to 3.0.0 from 3.0.0-alpha.12

@KevinvOosterhout
Copy link

I've upgraded from beta.3 and have not had the error message before.

@Dezmonter
Copy link

Dezmonter commented Mar 15, 2025

I have the same problem(

@HugoRCD
Copy link
Member

HugoRCD commented Mar 16, 2025

@moshetanzer Could you send a small reproduction because I just tried with the Dashboard template as well as with your code and I didn't manage to reproduce it 🤔

@thunfisch987
Copy link

thunfisch987 commented Apr 8, 2025

i seem to get the same warning but i'm not using ui-pro in any way

@willcdotdev
Copy link

willcdotdev commented Apr 9, 2025

I've been trying various ways to remedy this warning.
Once NuxtLayout was placed into UApp inside of app.vue the warning went away.

Warning exists when:

<NuxtLayout>
<UApp>
<NuxtPage/>
</UApp>
</NuxtLayout>

Warning gone when:

<UApp>
<NuxtLayout>
<NuxtPage/>
</NuxtLayout>
</UApp>

@thunfisch987
Copy link

thunfisch987 commented Apr 9, 2025

i'm not using NuxtLayout but when i have my navbar inside of the UApp it works

edit:
i narrowed it down to having a USlideover outside of the UApp

thunfisch987 added a commit to thunfisch987/otaku-dashboard that referenced this issue Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pro v3 #1289
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants