Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

cjholowatyj's avatar

Injection Symbol(SidebarContext) not found

I'm using the Laravel/Inertia/Vue starter kit, and I'm having this recurring problem during development whereby I get the following error whenever the Vite dev server is running (but the error either goes away or is silenced when the server is not running):

An error occurred: Injection Symbol(SidebarContext) not found. Component must be used within Sidebar Error: Injection Symbol(SidebarContext) not found. Component must be used within Sidebar at injectContext (https://flighter.test:5173/node_modules/.vite/deps/chunk-YV5TVZM5.js?v=507daa65:2973:11) at setup (https://flighter.test:5173/node_modules/.pnpm/@keddydigital+flighter@file+flighter_@[email protected]_@[email protected]_@inertiaj_70bacfc90e3d76ce6798a34ce4462df4/node_modules/@keddydigital/flighter/resources/js/interface/NavUser.vue:14:33) at callWithErrorHandling (https://flighter.test:5173/node_modules/.vite/deps/chunk-UBQYKEVF.js?v=507daa65:2448:19) at setupStatefulComponent (https://flighter.test:5173/node_modules/.vite/deps/chunk-UBQYKEVF.js?v=507daa65:10197:25) at setupComponent (https://flighter.test:5173/node_modules/.vite/deps/chunk-UBQYKEVF.js?v=507daa65:10158:36) at mountComponent (https://flighter.test:5173/node_modules/.vite/deps/chunk-UBQYKEVF.js?v=507daa65:7488:7) at processComponent (https://flighter.test:5173/node_modules/.vite/deps/chunk-UBQYKEVF.js?v=507daa65:7454:9) at patch (https://flighter.test:5173/node_modules/.vite/deps/chunk-UBQYKEVF.js?v=507daa65:6970:11) at mountChildren (https://flighter.test:5173/node_modules/.vite/deps/chunk-UBQYKEVF.js?v=507daa65:7202:7) at processFragment (https://flighter.test:5173/node_modules/.vite/deps/chunk-UBQYKEVF.js?v=507daa65:7384:7)

From what I can tell, the component is being called as a child within the Sidebar component, so I'm not sure why this error is happening...

This error is being triggered by the NavUser component, which is still in its original place as a child of the SidebarFooter element of the navigation...

0 likes
0 replies

Please or to participate in this conversation.