Exploring the use of route groups and nested layout files led to encountering a "module-not-found" error with every import that used "@".
Here is my jsconfig.json setup:
{
"compilerOptions": {
"baseUrl": "./src",
"paths": {
"@/*": ["*"],
"@components/*": ["components/*"],
"@lib/*": ["lib/*"],
"@app/*": ["app/*"]
}
}
}
The specific error message I am facing is:
⨯ ./src/app/(main)/dashboard/page.js:9:1
Module not found: Can't resolve '@lib/schemas/subscriptionSchema'
7 | import NotAccepted from "./notAccepted";
8 |
> 9 | import Subscription from "@lib/schemas/subscriptionSchema";
| ^
10 | import Users from "@/lib/schemas/userSchema";
11 | import Events from "@/lib/schemas/eventSchema";
12 | import Stripe from "stripe";
https://nextjs.org/docs/messages/module-not-found
Showing my folder structure:
https://i.sstatic.net/TpSAoByJ.png
I would greatly appreciate any assistance. Thank you
Using Next.js version 14.2.3
Attempted replacing @/ with ../../ (as needed) which worked but is not an ideal solution.