I created a context for sidebar but i cannot import this context into another component using alias.
the next.js version i am using is “next”: “14.2.2”,
I want to import provider like below using the alias
import { NavbarProvider } from “@/lib/context/SideBarContext”;
but i have to import with specified path like this
import { NavbarProvider } from “../lib/context/SideBarContext”;
to work.
even though i can get the data but how to resolve this issue how to import using alias
Akhil A G is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.